This commit is contained in:
Kartik K. Agaram 2014-11-06 15:24:16 -08:00
parent 6f8b711881
commit f462b986b1
2 changed files with 5 additions and 7 deletions

6
mu.arc
View File

@ -162,8 +162,6 @@
(mac caller-arg-idx (routine (o idx 0)) ; assignable
`((((rep ,routine) 'call-stack) ,idx) 'caller-arg-idx))
(= scheduling-interval* 500)
(mac caller-args (routine) ; assignable
`((((rep ,routine) 'call-stack) 0) 'args))
@ -175,7 +173,9 @@
(= completed-routines* (queue))
(= routine* nil)
(= abort-routine* (parameter nil))
(= curr-cycle* 0))
(= curr-cycle* 0)
(= scheduling-interval* 500)
)
; like arc's 'point' but you can also call ((abort-routine*)) in nested calls
(mac routine-mark body

View File

@ -1665,10 +1665,8 @@
(f2
((2 integer) <- copy (4 literal))
((2 integer) <- copy (4 literal)))))
(let old-scheduling-interval scheduling-interval*
(= scheduling-interval* 1)
(after (run 'f1 'f2)
(= scheduling-interval* old-scheduling-interval)))
(= scheduling-interval* 1)
(run 'f1 'f2)
(check-trace-contents "scheduler alternates between routines"
'(("run" "f1 0")
("run" "f2 0")