epoll.c 1.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. /* vi: set sw=4 ts=4: */
  2. /*
  3. * epoll_create() / epoll_ctl() / epoll_wait() for uClibc
  4. *
  5. * Copyright (C) 2000-2006 Erik Andersen <andersen@uclibc.org>
  6. *
  7. * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
  8. */
  9. #include <sys/syscall.h>
  10. #include <sys/epoll.h>
  11. /*
  12. * epoll_create()
  13. */
  14. #ifdef __NR_epoll_create
  15. _syscall1(int, epoll_create, int, size)
  16. #endif
  17. /*
  18. * epoll_create1()
  19. */
  20. #ifdef __NR_epoll_create1
  21. _syscall1(int, epoll_create1, int, flags)
  22. #endif
  23. /*
  24. * epoll_ctl()
  25. */
  26. #ifdef __NR_epoll_ctl
  27. _syscall4(int,epoll_ctl, int, epfd, int, op, int, fd, struct epoll_event *, event)
  28. #endif
  29. /*
  30. * epoll_wait()
  31. */
  32. #ifdef __NR_epoll_wait
  33. _syscall4(int, epoll_wait, int, epfd, struct epoll_event *, events, int, maxevents, int, timeout)
  34. /* TODO: add cancellation for epoll_wait */
  35. #endif
  36. /*
  37. * epoll_pwait()
  38. */
  39. #ifdef __NR_epoll_pwait
  40. _syscall5(int, epoll_pwait, int, epfd, struct epoll_event *, events, int, maxevents, int, timeout, __const sigset_t *, ss)
  41. /* TODO: add cancellation for epoll_pwait */
  42. #endif