timerfd.h 837 B

12345678910111213141516171819202122232425262728293031
  1. /*
  2. * include/linux/timerfd.h
  3. *
  4. * Copyright (C) 2007 Davide Libenzi <davidel@xmailserver.org>
  5. *
  6. */
  7. #ifndef _LINUX_TIMERFD_H
  8. #define _LINUX_TIMERFD_H
  9. /* For O_CLOEXEC and O_NONBLOCK */
  10. #include <linux/fcntl.h>
  11. /*
  12. * CAREFUL: Check include/asm-generic/fcntl.h when defining
  13. * new flags, since they might collide with O_* ones. We want
  14. * to re-use O_* flags that couldn't possibly have a meaning
  15. * from eventfd, in order to leave a free define-space for
  16. * shared O_* flags.
  17. */
  18. #define TFD_TIMER_ABSTIME (1 << 0)
  19. #define TFD_CLOEXEC O_CLOEXEC
  20. #define TFD_NONBLOCK O_NONBLOCK
  21. #define TFD_SHARED_FCNTL_FLAGS (TFD_CLOEXEC | TFD_NONBLOCK)
  22. /* Flags for timerfd_create. */
  23. #define TFD_CREATE_FLAGS TFD_SHARED_FCNTL_FLAGS
  24. /* Flags for timerfd_settime. */
  25. #define TFD_SETTIME_FLAGS TFD_TIMER_ABSTIME
  26. #endif /* _LINUX_TIMERFD_H */