This commit is contained in:
parent
339001ea83
commit
033d558a10
4
mu.arc
4
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*)
|
||||
|
|
4
mu.arc.t
4
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))
|
||||
|
|
Loading…
Reference in New Issue