about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorKartik K. Agaram <vc@akkartik.com>2014-12-28 17:12:10 -0800
committerKartik K. Agaram <vc@akkartik.com>2014-12-28 17:12:10 -0800
commit68c45cb8e68df88dc6a3f7a9f11a0b764fc31cd7 (patch)
treeb8108a21b755f5952a5f7f97e9d53f364d6e2dfb
parent05295080680c23b6e86c6c92710d00840ddf4aa0 (diff)
downloadmu-68c45cb8e68df88dc6a3f7a9f11a0b764fc31cd7.tar.gz
458
-rw-r--r--channel.mu8
1 files changed, 4 insertions, 4 deletions
diff --git a/channel.mu b/channel.mu
index 0ee53774..cb1721af 100644
--- a/channel.mu
+++ b/channel.mu
@@ -15,7 +15,7 @@
     ; channels take
     (n2:integer-address <- new integer:literal)
     (n2:integer-address/deref <- copy n:integer)
-    (n3:tagged-value-address <- new-tagged-value integer-address:literal n2:integer-address)
+    (n3:tagged-value-address <- init-tagged-value integer-address:literal n2:integer-address)
     (chan:channel-address/deref <- write chan:channel-address n3:tagged-value-address/deref)
     (n:integer <- add n:integer 1:literal)
     (loop)
@@ -40,9 +40,9 @@
 ])
 
 (function main [
-  (chan:channel-address <- new-channel 3:literal)
+  (chan:channel-address <- init-channel 3:literal)
   ; create two background 'routines' that communicate by a channel
-  (fork consumer:fn chan:channel-address)
-  (fork producer:fn chan:channel-address)
+  (fork consumer:fn nil:literal chan:channel-address)
+  (fork producer:fn nil:literal chan:channel-address)
   (sleep 2000:literal)  ; wait for forked routines to effect the transfer
 ])