Elliott Hughes | d35df49 | 2017-02-15 15:19:05 -0800 | [diff] [blame] | 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 | { |
Elliott Hughes | 39bac05 | 2017-05-25 16:56:11 -0700 | [diff] [blame] | 13 | TAIL_ALLOC_OBJECT_CONST_PTR(struct epoll_event, ev); |
Elliott Hughes | d35df49 | 2017-02-15 15:19:05 -0800 | [diff] [blame] | 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 |