2 #include <sys/syscall.h>
8 # include <sys/epoll.h>
14 struct epoll_event *const ev = tail_alloc(sizeof(*ev));
17 long rc = syscall(__NR_epoll_ctl, -1, EPOLL_CTL_ADD, -2, ev);
18 printf("epoll_ctl(-1, EPOLL_CTL_ADD, -2, {EPOLLIN,"
19 " {u32=%u, u64=%" PRIu64 "}}) = %ld %s (%m)\n",
20 ev->data.u32, ev->data.u64, rc, errno2name());
22 rc = syscall(__NR_epoll_ctl, -3, EPOLL_CTL_DEL, -4, ev);
23 printf("epoll_ctl(-3, EPOLL_CTL_DEL, -4, %p) = %ld %s (%m)\n",
24 ev, rc, errno2name());
26 rc = syscall(__NR_epoll_ctl, -1L, EPOLL_CTL_MOD, -16L, 0);
27 printf("epoll_ctl(-1, EPOLL_CTL_MOD, -16, NULL) = %ld %s (%m)\n",
30 puts("+++ exited with 0 +++");
36 SKIP_MAIN_UNDEFINED("__NR_epoll_ctl")