File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change 36
36
(local.set $bufp (i32.const 16 ))
37
37
(i32.store (local.get $bufp ) (i32.const 0x01234567 ))
38
38
(local.set $ret (call $stream.write (local.get $tx ) (local.get $bufp ) (i32.const 4 )))
39
- (if (i32.ne (i32.const 0x40 (; COMPLETED=0 | (4<<4) ;) ) (local.get $ret ))
39
+ (if (i32.ne (i32.const 0x40 (; DROPPED=1 | (4<<4) ;) ) (local.get $ret ))
40
40
(then unreachable ))
41
41
42
42
(call $stream.drop-writable (local.get $tx ))
53
53
;; return immediately so that the caller can just call synchronously
54
54
(call $task.return0 )
55
55
56
- ;; (stream.read $tx $bufp 4) will block and, because called
56
+ ;; (stream.read $rx $bufp 4) will block and, because called
57
57
;; synchronously, switch to the caller who will write and rendezvous
58
58
(local.set $bufp (i32.const 16 ))
59
59
(local.set $ret (call $stream.read (local.get $rx ) (local.get $bufp ) (i32.const 4 )))
60
- (if (i32.ne (i32.const 0x40 (; COMPLETED=0 | (4<<4) ;) ) (local.get $ret ))
60
+ (if (i32.ne (i32.const 0x40 (; DROPPED=1 | (4<<4) ;) ) (local.get $ret ))
61
61
(then unreachable ))
62
62
(if (i32.ne (i32.const 0x89abcdef ) (i32.load (local.get $bufp )))
63
63
(then unreachable ))
120
120
;; $rx = $C.get()
121
121
(local.set $rx (call $get ))
122
122
123
- ;; (stream.read $tx $bufp 4) will succeed without blocking
123
+ ;; (stream.read $rx $bufp 4) will succeed without blocking
124
124
(local.set $bufp (i32.const 20 ))
125
125
(local.set $ret (call $stream.read (local.get $rx ) (local.get $bufp ) (i32.const 4 )))
126
126
(if (i32.ne (i32.const 0x40 (; COMPLETED=0 | (4<<4) ;) ) (local.get $ret ))
You can’t perform that action at this time.
0 commit comments