timerfd.c 721 B

1234567891011121314151617181920212223242526272829303132
  1. /* vi: set sw=4 ts=4: */
  2. /*
  3. * timerfd_create() / timerfd_settime() / timerfd_gettime() for uClibc
  4. *
  5. * Copyright (C) 2009 Stephan Raue <stephan@openelec.tv>
  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/timerfd.h>
  11. /*
  12. * timerfd_create()
  13. */
  14. #ifdef __NR_timerfd_create
  15. _syscall2(int, timerfd_create, int, clockid, int, flags)
  16. #endif
  17. /*
  18. * timerfd_settime()
  19. */
  20. #ifdef __NR_timerfd_settime
  21. _syscall4(int,timerfd_settime, int, ufd, int, flags, const struct itimerspec *, utmr, struct itimerspec *, otmr)
  22. #endif
  23. /*
  24. * timerfd_gettime()
  25. */
  26. #ifdef __NR_timerfd_gettime
  27. _syscall2(int, timerfd_gettime, int, ufd, struct itimerspec *, otmr)
  28. #endif