diff options
Diffstat (limited to 'include/linux/eventfd.h')
-rw-r--r-- | include/linux/eventfd.h | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/include/linux/eventfd.h b/include/linux/eventfd.h index a667637b54e3..f45a8ae5f828 100644 --- a/include/linux/eventfd.h +++ b/include/linux/eventfd.h | |||
@@ -13,10 +13,20 @@ | |||
13 | /* For O_CLOEXEC and O_NONBLOCK */ | 13 | /* For O_CLOEXEC and O_NONBLOCK */ |
14 | #include <linux/fcntl.h> | 14 | #include <linux/fcntl.h> |
15 | 15 | ||
16 | /* Flags for eventfd2. */ | 16 | /* |
17 | * CAREFUL: Check include/asm-generic/fcntl.h when defining | ||
18 | * new flags, since they might collide with O_* ones. We want | ||
19 | * to re-use O_* flags that couldn't possibly have a meaning | ||
20 | * from eventfd, in order to leave a free define-space for | ||
21 | * shared O_* flags. | ||
22 | */ | ||
23 | #define EFD_SEMAPHORE (1 << 0) | ||
17 | #define EFD_CLOEXEC O_CLOEXEC | 24 | #define EFD_CLOEXEC O_CLOEXEC |
18 | #define EFD_NONBLOCK O_NONBLOCK | 25 | #define EFD_NONBLOCK O_NONBLOCK |
19 | 26 | ||
27 | #define EFD_SHARED_FCNTL_FLAGS (O_CLOEXEC | O_NONBLOCK) | ||
28 | #define EFD_FLAGS_SET (EFD_SHARED_FCNTL_FLAGS | EFD_SEMAPHORE) | ||
29 | |||
20 | struct file *eventfd_fget(int fd); | 30 | struct file *eventfd_fget(int fd); |
21 | int eventfd_signal(struct file *file, int n); | 31 | int eventfd_signal(struct file *file, int n); |
22 | 32 | ||