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