1
0

timerfd.h 591 B

1234567891011121314151617181920212223242526272829303132
  1. #ifndef _SYS_TIMERFD_H
  2. #define _SYS_TIMERFD_H
  3. #ifdef __cplusplus
  4. extern "C" {
  5. #endif
  6. #include <time.h>
  7. #include <fcntl.h>
  8. #define TFD_NONBLOCK O_NONBLOCK
  9. #define TFD_CLOEXEC O_CLOEXEC
  10. #define TFD_TIMER_ABSTIME 1
  11. #define TFD_TIMER_CANCEL_ON_SET (1 << 1)
  12. struct itimerspec;
  13. int timerfd_create(int, int);
  14. int timerfd_settime(int, int, const struct itimerspec *, struct itimerspec *);
  15. int timerfd_gettime(int, struct itimerspec *);
  16. #if _REDIR_TIME64
  17. __REDIR(timerfd_settime, __timerfd_settime64);
  18. __REDIR(timerfd_gettime, __timerfd_gettime64);
  19. #endif
  20. #ifdef __cplusplus
  21. }
  22. #endif
  23. #endif