aboutsummaryrefslogtreecommitdiff
path: root/tests/threads/accept/close_order.zc
blob: 5c0949fa161ab975d521a910f6c6d5b1d0595699 (plain) (blame)
1
2
3
4
5
6
7
8
9
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;
}