timerfd.h 904 字节
Newer Older
1 2 3 4 5 6 7 8 9 10
/*
 *  include/linux/timerfd.h
 *
 *  Copyright (C) 2007  Davide Libenzi <davidel@xmailserver.org>
 *
 */

#ifndef _LINUX_TIMERFD_H
#define _LINUX_TIMERFD_H

11
/* For O_CLOEXEC and O_NONBLOCK */
U
Ulrich Drepper 已提交
12
#include <linux/fcntl.h>
13

D
Davide Libenzi 已提交
14 15 16 17 18 19 20
/*
 * CAREFUL: Check include/asm-generic/fcntl.h when defining
 * new flags, since they might collide with O_* ones. We want
 * to re-use O_* flags that couldn't possibly have a meaning
 * from eventfd, in order to leave a free define-space for
 * shared O_* flags.
 */
21
#define TFD_TIMER_ABSTIME (1 << 0)
22
#define TFD_TIMER_CANCELON_SET (1 << 1)
U
Ulrich Drepper 已提交
23
#define TFD_CLOEXEC O_CLOEXEC
24
#define TFD_NONBLOCK O_NONBLOCK
25

D
Davide Libenzi 已提交
26 27 28 29
#define TFD_SHARED_FCNTL_FLAGS (TFD_CLOEXEC | TFD_NONBLOCK)
/* Flags for timerfd_create.  */
#define TFD_CREATE_FLAGS TFD_SHARED_FCNTL_FLAGS
/* Flags for timerfd_settime.  */
30
#define TFD_SETTIME_FLAGS (TFD_TIMER_ABSTIME | TFD_TIMER_CANCELON_SET)
31 32

#endif /* _LINUX_TIMERFD_H */