1 #include "tests.h"
2 #include <asm/unistd.h>
3
4 #ifdef __NR_epoll_pwait
5
6 # include <signal.h>
7 # include <stdio.h>
8 # include <sys/epoll.h>
9 # include <unistd.h>
10
11 int
main(void)12 main(void)
13 {
14 sigset_t set[2];
15 TAIL_ALLOC_OBJECT_CONST_PTR(struct epoll_event, ev);
16
17 long rc = syscall(__NR_epoll_pwait, -1, ev, 1, -2,
18 set, (kernel_ulong_t) sizeof(set));
19 printf("epoll_pwait(-1, %p, 1, -2, %p, %u) = %ld %s (%m)\n",
20 ev, set, (unsigned) sizeof(set), rc, errno2name());
21
22 puts("+++ exited with 0 +++");
23 return 0;
24 }
25
26 #else
27
28 SKIP_MAIN_UNDEFINED("__NR_epoll_pwait")
29
30 #endif
31