diff options
Diffstat (limited to 'tests/threads/accept/close_order.zc')
| -rw-r--r-- | tests/threads/accept/close_order.zc | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/threads/accept/close_order.zc b/tests/threads/accept/close_order.zc new file mode 100644 index 0000000..5c0949f --- /dev/null +++ b/tests/threads/accept/close_order.zc @@ -0,0 +1,10 @@ +namespace; +include rt; +unchecked fn main() { + int fd = 0; + let first = rt.syscall(51, fn() { rt.syscall(2, fd, 0, 0); return 0; } as word, &fd, 0); + rt.put_n(rt.syscall(52, first, 0, 0)); rt.put_c(' '); + let second = rt.syscall(51, fn() { int value; rt.syscall(45, fd, &value, 1); return 0; } as word, &fd, 0); + rt.syscall(2, fd, 0, 0); rt.put_n(rt.syscall(52, second, 1, 0)); rt.put_c(' '); + rt.put_n(rt.syscall(52, second, 1, 0)); rt.put_c(10); return 0; +} |
