epoll.c 608 B

12345678910111213141516171819202122232425262728
  1. #include <sys/epoll.h>
  2. #include <signal.h>
  3. #include "syscall.h"
  4. int epoll_create(int size)
  5. {
  6. return syscall(SYS_epoll_create, size);
  7. }
  8. int epoll_create1(int flags)
  9. {
  10. return syscall(SYS_epoll_create1, flags);
  11. }
  12. int epoll_ctl(int fd, int op, int fd2, struct epoll_event *ev)
  13. {
  14. return syscall(SYS_epoll_ctl, fd, op, fd2, ev);
  15. }
  16. int epoll_pwait(int fd, struct epoll_event *ev, int cnt, int to, const sigset_t *sigs)
  17. {
  18. return syscall(SYS_epoll_pwait, fd, ev, cnt, to, sigs, _NSIG/8);
  19. }
  20. int epoll_wait(int fd, struct epoll_event *ev, int cnt, int to)
  21. {
  22. return syscall(SYS_epoll_wait, fd, ev, cnt, to);
  23. }