about summary refs log tree commit diff stats
path: root/072channel.mu
diff options
context:
space:
mode:
authorKartik K. Agaram <vc@akkartik.com>2016-04-15 09:12:48 -0700
committerKartik K. Agaram <vc@akkartik.com>2016-04-15 09:12:48 -0700
commit2cc42dcec9809efd12de279a7cc4641db691e0a8 (patch)
treec5e1cdcaad3dc3bae84647b4f2a1b74a093af372 /072channel.mu
parentd762cddf4c49bcdef6e3d7358565374525a685a0 (diff)
downloadmu-2cc42dcec9809efd12de279a7cc4641db691e0a8.tar.gz
2834 - make 'wait-for-location' more intuitive
Previously to watch an address we had to perform a lookup of it, which
the instruction then proceeded to undo. This way wait-for-instruction no
longer supports literal ingredients, but the real-world usage becomes
cleaner.
Diffstat (limited to '072channel.mu')
-rw-r--r--072channel.mu4
1 files changed, 2 insertions, 2 deletions
diff --git a/072channel.mu b/072channel.mu
index 0e9b0041..2633b80a 100644
--- a/072channel.mu
+++ b/072channel.mu
@@ -66,7 +66,7 @@ def write out:address:shared:sink:_elem, val:_elem -> out:address:shared:sink:_e
     full:boolean <- channel-full? chan
     break-unless full
     full-address:address:number <- get-address *chan, first-full:offset
-    wait-for-location *full-address
+    wait-for-location full-address
   }
   # store val
   circular-buffer:address:shared:array:_elem <- get *chan, data:offset
@@ -93,7 +93,7 @@ def read in:address:shared:source:_elem -> result:_elem, in:address:shared:sourc
     empty?:boolean <- channel-empty? chan
     break-unless empty?
     free-address:address:number <- get-address *chan, first-free:offset
-    wait-for-location *free-address
+    wait-for-location free-address
   }
   # read result
   full:address:number <- get-address *chan, first-full:offset