6 int epoll_create(int size
)
8 return epoll_create1(0);
11 int epoll_create1(int flags
)
13 int r
= __syscall(SYS_epoll_create1
, flags
);
14 #ifdef SYS_epoll_create
15 if (r
==-ENOSYS
&& !flags
) r
= __syscall(SYS_epoll_create
, 1);
17 return __syscall_ret(r
);
20 int epoll_ctl(int fd
, int op
, int fd2
, struct epoll_event
*ev
)
22 return syscall(SYS_epoll_ctl
, fd
, op
, fd2
, ev
);
25 int epoll_pwait(int fd
, struct epoll_event
*ev
, int cnt
, int to
, const sigset_t
*sigs
)
27 int r
= __syscall_cp(SYS_epoll_pwait
, fd
, ev
, cnt
, to
, sigs
, _NSIG
/8);
29 if (r
==-ENOSYS
&& !sigs
) r
= __syscall_cp(SYS_epoll_wait
, fd
, ev
, cnt
, to
);
31 return __syscall_ret(r
);
34 int epoll_wait(int fd
, struct epoll_event
*ev
, int cnt
, int to
)
36 return epoll_pwait(fd
, ev
, cnt
, to
, 0);