]> granicus.if.org Git - strace/blob - tests/epoll_wait.c
038bf1f788acd60f637a00542c5b117c814d2480
[strace] / tests / epoll_wait.c
1 #include "tests.h"
2 #include <asm/unistd.h>
3
4 #ifdef __NR_epoll_wait
5
6 # include <stdio.h>
7 # include <sys/epoll.h>
8 # include <unistd.h>
9
10 int
11 main(void)
12 {
13         struct epoll_event *const ev = tail_alloc(sizeof(*ev));
14
15         long rc = syscall(__NR_epoll_wait, -1, ev, 1, -2);
16         printf("epoll_wait(-1, %p, 1, -2) = %ld %s (%m)\n",
17                ev, rc, errno2name());
18
19         puts("+++ exited with 0 +++");
20         return 0;
21 }
22
23 #else
24
25 SKIP_MAIN_UNDEFINED("__NR_epoll_wait")
26
27 #endif