blob: c2eb563bb86d1882255040034c220830dc0c2276 [file] [log] [blame]
Fei Jiec75e2c22016-04-08 15:59:16 +08001#include "tests.h"
2#include <sys/syscall.h>
3
Dmitry V. Levin6d440122016-05-09 21:46:17 +00004#ifdef __NR_epoll_wait
Fei Jiec75e2c22016-04-08 15:59:16 +08005
Fei Jiec75e2c22016-04-08 15:59:16 +08006# include <stdio.h>
7# include <sys/epoll.h>
8# include <unistd.h>
9
10int
11main(void)
12{
13 struct epoll_event *const ev = tail_alloc(sizeof(*ev));
14
Dmitry V. Levin33568cf2016-04-21 20:38:15 +000015 long rc = syscall(__NR_epoll_wait, -1, ev, 1, -2);
16 printf("epoll_wait(-1, %p, 1, -2) = %ld %s (%m)\n",
Dmitry V. Levin9f6611b2016-04-21 17:49:32 +000017 ev, rc, errno2name());
Fei Jiec75e2c22016-04-08 15:59:16 +080018
19 puts("+++ exited with 0 +++");
20 return 0;
21}
22
23#else
24
Dmitry V. Levin6d440122016-05-09 21:46:17 +000025SKIP_MAIN_UNDEFINED("__NR_epoll_wait")
Fei Jiec75e2c22016-04-08 15:59:16 +080026
27#endif