about summary refs log tree commit diff stats
path: root/mu.arc
diff options
context:
space:
mode:
authorKartik K. Agaram <vc@akkartik.com>2014-11-23 06:20:41 -0800
committerKartik K. Agaram <vc@akkartik.com>2014-11-23 06:20:41 -0800
commitede58a0b52492fb317296c9528357b9358870aa3 (patch)
tree9e997faf2f464f745533f7ed817489c1e05f4e72 /mu.arc
parentc3d777e9c211c6fb32671c6334d9863685fb44b6 (diff)
downloadmu-ede58a0b52492fb317296c9528357b9358870aa3.tar.gz
302 - now we can add some labels to 'write'
The hope is that those labels will help us test the race condition by
hooking into the scheduler.

Hooking into the scheduler will complicate the task of dropping racket
and running tests natively. But we'll worry about that later.
Diffstat (limited to 'mu.arc')
-rw-r--r--mu.arc2
1 files changed, 2 insertions, 0 deletions
diff --git a/mu.arc b/mu.arc
index a481c1ea..1dc43b62 100644
--- a/mu.arc
+++ b/mu.arc
@@ -951,8 +951,10 @@
     ; race condition: might unnecessarily sleep if consumer routine reads from
     ; channel between previous check and the set to watch below
     (break-unless (full boolean))
+    wipe-read
     ((watch boolean-address) <- get-address (chan channel-address deref) (read-watch offset))
     ((watch boolean-address deref) <- copy (nil literal))
+    start-sleep
     (sleep (watch boolean-address deref))
   }
   ; store val