Rich Felker | 231b9d1 | 2012-09-08 00:21:02 -0400 | [diff] [blame] | 1 | #ifndef _SYS_TIMERFD_H |
| 2 | #define _SYS_TIMERFD_H |
| 3 | |
| 4 | #ifdef __cplusplus |
| 5 | extern "C" { |
| 6 | #endif |
| 7 | |
| 8 | #include <time.h> |
Rich Felker | d509556 | 2012-12-13 14:15:11 -0500 | [diff] [blame] | 9 | #include <fcntl.h> |
| 10 | |
| 11 | #define TFD_NONBLOCK O_NONBLOCK |
| 12 | #define TFD_CLOEXEC O_CLOEXEC |
| 13 | |
| 14 | #define TFD_TIMER_ABSTIME 1 |
Szabolcs Nagy | d800403 | 2017-03-05 23:54:52 +0000 | [diff] [blame] | 15 | #define TFD_TIMER_CANCEL_ON_SET (1 << 1) |
Rich Felker | 231b9d1 | 2012-09-08 00:21:02 -0400 | [diff] [blame] | 16 | |
Rich Felker | 9c3da89 | 2015-03-04 14:38:08 -0500 | [diff] [blame] | 17 | struct itimerspec; |
| 18 | |
Rich Felker | 231b9d1 | 2012-09-08 00:21:02 -0400 | [diff] [blame] | 19 | int timerfd_create(int, int); |
| 20 | int timerfd_settime(int, int, const struct itimerspec *, struct itimerspec *); |
| 21 | int timerfd_gettime(int, struct itimerspec *); |
| 22 | |
Rich Felker | 1febd21 | 2019-07-31 15:24:58 -0400 | [diff] [blame] | 23 | #if _REDIR_TIME64 |
| 24 | __REDIR(timerfd_settime, __timerfd_settime64); |
| 25 | __REDIR(timerfd_gettime, __timerfd_gettime64); |
| 26 | #endif |
| 27 | |
Rich Felker | 231b9d1 | 2012-09-08 00:21:02 -0400 | [diff] [blame] | 28 | #ifdef __cplusplus |
| 29 | } |
| 30 | #endif |
| 31 | |
| 32 | #endif |