diff options
Diffstat (limited to 'include/linux/eventpoll.h')
| -rw-r--r-- | include/linux/eventpoll.h | 52 |
1 files changed, 1 insertions, 51 deletions
diff --git a/include/linux/eventpoll.h b/include/linux/eventpoll.h index f4bb378ccf6a..6daf6d4971f6 100644 --- a/include/linux/eventpoll.h +++ b/include/linux/eventpoll.h | |||
| @@ -10,58 +10,11 @@ | |||
| 10 | * Davide Libenzi <davidel@xmailserver.org> | 10 | * Davide Libenzi <davidel@xmailserver.org> |
| 11 | * | 11 | * |
| 12 | */ | 12 | */ |
| 13 | |||
| 14 | #ifndef _LINUX_EVENTPOLL_H | 13 | #ifndef _LINUX_EVENTPOLL_H |
| 15 | #define _LINUX_EVENTPOLL_H | 14 | #define _LINUX_EVENTPOLL_H |
| 16 | 15 | ||
| 17 | /* For O_CLOEXEC */ | 16 | #include <uapi/linux/eventpoll.h> |
| 18 | #include <linux/fcntl.h> | ||
| 19 | #include <linux/types.h> | ||
| 20 | |||
| 21 | /* Flags for epoll_create1. */ | ||
| 22 | #define EPOLL_CLOEXEC O_CLOEXEC | ||
| 23 | |||
| 24 | /* Valid opcodes to issue to sys_epoll_ctl() */ | ||
| 25 | #define EPOLL_CTL_ADD 1 | ||
| 26 | #define EPOLL_CTL_DEL 2 | ||
| 27 | #define EPOLL_CTL_MOD 3 | ||
| 28 | |||
| 29 | /* | ||
| 30 | * Request the handling of system wakeup events so as to prevent system suspends | ||
| 31 | * from happening while those events are being processed. | ||
| 32 | * | ||
| 33 | * Assuming neither EPOLLET nor EPOLLONESHOT is set, system suspends will not be | ||
| 34 | * re-allowed until epoll_wait is called again after consuming the wakeup | ||
| 35 | * event(s). | ||
| 36 | * | ||
| 37 | * Requires CAP_BLOCK_SUSPEND | ||
| 38 | */ | ||
| 39 | #define EPOLLWAKEUP (1 << 29) | ||
| 40 | |||
| 41 | /* Set the One Shot behaviour for the target file descriptor */ | ||
| 42 | #define EPOLLONESHOT (1 << 30) | ||
| 43 | 17 | ||
| 44 | /* Set the Edge Triggered behaviour for the target file descriptor */ | ||
| 45 | #define EPOLLET (1 << 31) | ||
| 46 | |||
| 47 | /* | ||
| 48 | * On x86-64 make the 64bit structure have the same alignment as the | ||
| 49 | * 32bit structure. This makes 32bit emulation easier. | ||
| 50 | * | ||
| 51 | * UML/x86_64 needs the same packing as x86_64 | ||
| 52 | */ | ||
| 53 | #ifdef __x86_64__ | ||
| 54 | #define EPOLL_PACKED __attribute__((packed)) | ||
| 55 | #else | ||
| 56 | #define EPOLL_PACKED | ||
| 57 | #endif | ||
| 58 | |||
| 59 | struct epoll_event { | ||
| 60 | __u32 events; | ||
| 61 | __u64 data; | ||
| 62 | } EPOLL_PACKED; | ||
| 63 | |||
| 64 | #ifdef __KERNEL__ | ||
| 65 | 18 | ||
| 66 | /* Forward declarations to avoid compiler errors */ | 19 | /* Forward declarations to avoid compiler errors */ |
| 67 | struct file; | 20 | struct file; |
| @@ -115,7 +68,4 @@ static inline void eventpoll_release(struct file *file) {} | |||
| 115 | 68 | ||
| 116 | #endif | 69 | #endif |
| 117 | 70 | ||
| 118 | #endif /* #ifdef __KERNEL__ */ | ||
| 119 | |||
| 120 | #endif /* #ifndef _LINUX_EVENTPOLL_H */ | 71 | #endif /* #ifndef _LINUX_EVENTPOLL_H */ |
| 121 | |||
