timerfd.h 951 B

1234567891011121314151617181920212223242526272829303132333435363738
  1. /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
  2. /*
  3. * include/linux/timerfd.h
  4. *
  5. * Copyright (C) 2007 Davide Libenzi <davidel@xmailserver.org>
  6. *
  7. */
  8. #ifndef _UAPI_LINUX_TIMERFD_H
  9. #define _UAPI_LINUX_TIMERFD_H
  10. #include <linux/types.h>
  11. /* For O_CLOEXEC and O_NONBLOCK */
  12. #include <linux/fcntl.h>
  13. /* For _IO helpers */
  14. #include <linux/ioctl.h>
  15. /*
  16. * CAREFUL: Check include/asm-generic/fcntl.h when defining
  17. * new flags, since they might collide with O_* ones. We want
  18. * to re-use O_* flags that couldn't possibly have a meaning
  19. * from eventfd, in order to leave a free define-space for
  20. * shared O_* flags.
  21. *
  22. * Also make sure to update the masks in include/linux/timerfd.h
  23. * when adding new flags.
  24. */
  25. #define TFD_TIMER_ABSTIME (1 << 0)
  26. #define TFD_TIMER_CANCEL_ON_SET (1 << 1)
  27. #define TFD_CLOEXEC O_CLOEXEC
  28. #define TFD_NONBLOCK O_NONBLOCK
  29. #define TFD_IOC_SET_TICKS _IOW('T', 0, __u64)
  30. #endif /* _UAPI_LINUX_TIMERFD_H */