timerfd.c 696 B

12345678910111213141516171819202122232425262728293031
  1. /*
  2. * timerfd_create() / timerfd_settime() / timerfd_gettime() for uClibc
  3. *
  4. * Copyright (C) 2009 Stephan Raue <stephan@openelec.tv>
  5. *
  6. * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
  7. */
  8. #include <sys/syscall.h>
  9. #include <sys/timerfd.h>
  10. /*
  11. * timerfd_create()
  12. */
  13. #ifdef __NR_timerfd_create
  14. _syscall2(int, timerfd_create, int, clockid, int, flags)
  15. #endif
  16. /*
  17. * timerfd_settime()
  18. */
  19. #ifdef __NR_timerfd_settime
  20. _syscall4(int,timerfd_settime, int, ufd, int, flags, const struct itimerspec *, utmr, struct itimerspec *, otmr)
  21. #endif
  22. /*
  23. * timerfd_gettime()
  24. */
  25. #ifdef __NR_timerfd_gettime
  26. _syscall2(int, timerfd_gettime, int, ufd, struct itimerspec *, otmr)
  27. #endif