diff options
| author | Andrew Morton <akpm@osdl.org> | 2004-01-20 03:11:23 -0800 |
|---|---|---|
| committer | Linus Torvalds <torvalds@home.osdl.org> | 2004-01-20 03:11:23 -0800 |
| commit | edd011045dadc70d9c389040f750896ee9f12630 (patch) | |
| tree | e6fa7e35b0424ffed1d6eb3280e862948cf30099 /include/linux | |
| parent | f76fe2f64a622d02e7755c423db0c3cd4ba62589 (diff) | |
[PATCH] One-shot support for epoll
From: Davide Libenzi <davidel@xmailserver.org>
The attached patch implements the one-shot support for epoll. Because of
the way epoll works (hooking f_op->poll()) the ET behavior is not really ET
because it might happen that, while data is still available to read (for
the EPOLLIN case), another chunk will become available triggering another
event.
While those conditions can be easily be handled in userspace, the absolute
triviality of the patch and the avoidance of user/kernel space switches and
f_op->poll() calls, make IMHO worth doing this inside epoll itself.
Diffstat (limited to 'include/linux')
| -rw-r--r-- | include/linux/eventpoll.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/include/linux/eventpoll.h b/include/linux/eventpoll.h index 1ece9f119220..136c6315e6af 100644 --- a/include/linux/eventpoll.h +++ b/include/linux/eventpoll.h @@ -22,6 +22,9 @@ #define EPOLL_CTL_DEL 2 #define EPOLL_CTL_MOD 3 +/* Set the One Shot behaviour for the target file descriptor */ +#define EPOLLONESHOT (1 << 30) + /* Set the Edge Triggered behaviour for the target file descriptor */ #define EPOLLET (1 << 31) |
