timerfd.h 873 B

123456789101112131415161718192021222324252627282930313233343536
  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. #include <linux/types.h>
  10. /* For O_CLOEXEC and O_NONBLOCK */
  11. #include <linux/fcntl.h>
  12. /* For _IO helpers */
  13. #include <linux/ioctl.h>
  14. /*
  15. * CAREFUL: Check include/asm-generic/fcntl.h when defining
  16. * new flags, since they might collide with O_* ones. We want
  17. * to re-use O_* flags that couldn't possibly have a meaning
  18. * from eventfd, in order to leave a free define-space for
  19. * shared O_* flags.
  20. *
  21. * Also make sure to update the masks in include/linux/timerfd.h
  22. * when adding new flags.
  23. */
  24. #define TFD_TIMER_ABSTIME (1 << 0)
  25. #define TFD_TIMER_CANCEL_ON_SET (1 << 1)
  26. #define TFD_CLOEXEC O_CLOEXEC
  27. #define TFD_NONBLOCK O_NONBLOCK
  28. #define TFD_IOC_SET_TICKS _IOW('T', 0, __u64)
  29. #endif /* _LINUX_TIMERFD_H */