timerfd.h 430 B

1234567891011121314151617181920212223242526
  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. struct itimerspec;
  12. int timerfd_create(int, int);
  13. int timerfd_settime(int, int, const struct itimerspec *, struct itimerspec *);
  14. int timerfd_gettime(int, struct itimerspec *);
  15. #ifdef __cplusplus
  16. }
  17. #endif
  18. #endif