diff options
author | Kartik K. Agaram <vc@akkartik.com> | 2014-08-31 11:27:58 -0700 |
---|---|---|
committer | Kartik K. Agaram <vc@akkartik.com> | 2014-08-31 11:27:58 -0700 |
commit | 033d558a10993d99b91e11e5f500f30adcb10aec (patch) | |
tree | 0f2cfe08659c9a5360ad7062a821743e085cbc5b | |
parent | 339001ea8345f996c638159d25e3e901be11790a (diff) | |
download | mu-033d558a10993d99b91e11e5f500f30adcb10aec.tar.gz |
92
-rw-r--r-- | mu.arc | 4 | ||||
-rw-r--r-- | 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)) |