about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorKartik K. Agaram <vc@akkartik.com>2014-11-21 14:48:06 -0800
committerKartik K. Agaram <vc@akkartik.com>2014-11-21 14:56:10 -0800
commita384ea314c14bab2c1043a2e5f07a6ebb9052f70 (patch)
treef1f61111c177837192e4e1fc280cfa311dd0c470
parente39b41c3c2bb7fc175a6aa931041b5bcb4a6656d (diff)
downloadmu-a384ea314c14bab2c1043a2e5f07a6ebb9052f70.tar.gz
279 - one new test passing, but sleep now hangs
-rw-r--r--mu.arc7
1 files changed, 5 insertions, 2 deletions
diff --git a/mu.arc b/mu.arc
index 89764590..59c4338c 100644
--- a/mu.arc
+++ b/mu.arc
@@ -85,7 +85,7 @@
   (= traces* (queue)))
 
 (def new-trace (filename)
-;?   (prn "new-trace " filename)
+  (prn "new-trace " filename)
   (= curr-trace-file* filename))
 
 (= dump-trace* nil)
@@ -209,7 +209,10 @@
 ;   wake up any necessary sleeping routines (either by time or on a location)
 ;   detect deadlock: kill all sleeping routines when none can be woken
 (def update-scheduler-state ()
-  (push routine* completed-routines*)
+  (if (~empty routine*)
+        (enq routine* running-routines*)
+      :else
+        (push routine* completed-routines*))
   )
 
 ;?   (while (or (~empty running-routines*)