From 033d558a10993d99b91e11e5f500f30adcb10aec Mon Sep 17 00:00:00 2001 From: "Kartik K. Agaram" Date: Sun, 31 Aug 2014 11:27:58 -0700 Subject: [PATCH] 92 --- mu.arc | 4 ++-- mu.arc.t | 4 +--- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/mu.arc b/mu.arc index 07c15ffe..563c3d68 100644 --- a/mu.arc +++ b/mu.arc @@ -183,9 +183,9 @@ (= contexts* (queue)) -(def run ((o fn-name)) +(def run fn-names (ret result 0 - (aif fn-name + (each it fn-names (enq make-context.it contexts*)) ; simple round-robin scheduler (while (~empty contexts*) diff --git a/mu.arc.t b/mu.arc.t index 2ab4d9c8..3c94d298 100644 --- a/mu.arc.t +++ b/mu.arc.t @@ -669,9 +669,7 @@ ((1 integer) <- literal 3)) (f2 ((2 integer) <- literal 4)))) -(enq make-context!f1 contexts*) -(enq make-context!f2 contexts*) -(let ninsts (run) +(let ninsts (run 'f1 'f2) (when (~iso 2 ninsts) (prn "F - scheduler didn't run the right number of instructions: " ninsts))) (if (~iso memory* (obj 1 3 2 4))