1570af302Sopenharmony_ci#ifndef _SYS_TIMERFD_H
2570af302Sopenharmony_ci#define _SYS_TIMERFD_H
3570af302Sopenharmony_ci
4570af302Sopenharmony_ci#ifdef __cplusplus
5570af302Sopenharmony_ciextern "C" {
6570af302Sopenharmony_ci#endif
7570af302Sopenharmony_ci
8570af302Sopenharmony_ci#include <time.h>
9570af302Sopenharmony_ci#include <fcntl.h>
10570af302Sopenharmony_ci
11570af302Sopenharmony_ci#define TFD_NONBLOCK O_NONBLOCK
12570af302Sopenharmony_ci#define TFD_CLOEXEC O_CLOEXEC
13570af302Sopenharmony_ci
14570af302Sopenharmony_ci#define TFD_TIMER_ABSTIME 1
15570af302Sopenharmony_ci#define TFD_TIMER_CANCEL_ON_SET (1 << 1)
16570af302Sopenharmony_ci
17570af302Sopenharmony_cistruct itimerspec;
18570af302Sopenharmony_ci
19570af302Sopenharmony_ciint timerfd_create(int, int);
20570af302Sopenharmony_ciint timerfd_settime(int, int, const struct itimerspec *, struct itimerspec *);
21570af302Sopenharmony_ciint timerfd_gettime(int, struct itimerspec *);
22570af302Sopenharmony_ci
23570af302Sopenharmony_ci#if _REDIR_TIME64
24570af302Sopenharmony_ci__REDIR(timerfd_settime, __timerfd_settime64);
25570af302Sopenharmony_ci__REDIR(timerfd_gettime, __timerfd_gettime64);
26570af302Sopenharmony_ci#endif
27570af302Sopenharmony_ci
28570af302Sopenharmony_ci#ifdef __cplusplus
29570af302Sopenharmony_ci}
30570af302Sopenharmony_ci#endif
31570af302Sopenharmony_ci
32570af302Sopenharmony_ci#endif
33