1#ifndef _SYS_TIMERFD_H 2#define _SYS_TIMERFD_H 3 4#ifdef __cplusplus 5extern "C" { 6#endif 7 8#include <time.h> 9#include <fcntl.h> 10 11#define TFD_NONBLOCK O_NONBLOCK 12#define TFD_CLOEXEC O_CLOEXEC 13 14#define TFD_TIMER_ABSTIME 1 15#define TFD_TIMER_CANCEL_ON_SET (1 << 1) 16 17struct itimerspec; 18 19int timerfd_create(int, int); 20int timerfd_settime(int, int, const struct itimerspec *, struct itimerspec *); 21int timerfd_gettime(int, struct itimerspec *); 22 23#if _REDIR_TIME64 24__REDIR(timerfd_settime, __timerfd_settime64); 25__REDIR(timerfd_gettime, __timerfd_gettime64); 26#endif 27 28#ifdef __cplusplus 29} 30#endif 31 32#endif 33