6 int epoll_create(int size)
8 if (size<=0) return __syscall_ret(-EINVAL);
9 return epoll_create1(0);
12 int epoll_create1(int flags)
14 int r = __syscall(SYS_epoll_create1, flags);
15 #ifdef SYS_epoll_create
16 if (r==-ENOSYS && !flags) r = __syscall(SYS_epoll_create, 1);
18 return __syscall_ret(r);
21 int epoll_ctl(int fd, int op, int fd2, struct epoll_event *ev)
23 return syscall(SYS_epoll_ctl, fd, op, fd2, ev);
26 int epoll_pwait(int fd, struct epoll_event *ev, int cnt, int to, const sigset_t *sigs)
28 int r = __syscall_cp(SYS_epoll_pwait, fd, ev, cnt, to, sigs, _NSIG/8);
30 if (r==-ENOSYS && !sigs) r = __syscall_cp(SYS_epoll_wait, fd, ev, cnt, to);
32 return __syscall_ret(r);
35 int epoll_wait(int fd, struct epoll_event *ev, int cnt, int to)
37 return epoll_pwait(fd, ev, cnt, to, 0);