liyujie
2025-08-28 786ff4f4ca2374bdd9177f2e24b503d43e7a3b93
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
#include "tests.h"
#include <asm/unistd.h>
 
#ifdef __NR_epoll_wait
 
# include <stdio.h>
# include <sys/epoll.h>
# include <unistd.h>
 
int
main(void)
{
   TAIL_ALLOC_OBJECT_CONST_PTR(struct epoll_event, ev);
 
   long rc = syscall(__NR_epoll_wait, -1, ev, 1, -2);
   printf("epoll_wait(-1, %p, 1, -2) = %ld %s (%m)\n",
          ev, rc, errno2name());
 
   puts("+++ exited with 0 +++");
   return 0;
}
 
#else
 
SKIP_MAIN_UNDEFINED("__NR_epoll_wait")
 
#endif