summaryrefslogtreecommitdiff
path: root/include/linux/eventpoll.h
diff options
context:
space:
mode:
authorJens Axboe <axboe@kernel.dk>2020-01-08 15:05:37 -0700
committerJens Axboe <axboe@kernel.dk>2020-01-29 15:45:47 -0700
commit39220e8d4a2aaab045ea03cc16d737e85d0817bf (patch)
tree2f632dd3e4f97820a9bb9de3bc18682c72ba5015 /include/linux/eventpoll.h
parent58e41a44c488f3e9601fd8150f58377ef8f44889 (diff)
downloadlwn-39220e8d4a2aaab045ea03cc16d737e85d0817bf.tar.gz
lwn-39220e8d4a2aaab045ea03cc16d737e85d0817bf.zip
eventpoll: support non-blocking do_epoll_ctl() calls
Also make it available outside of epoll, along with the helper that decides if we need to copy the passed in epoll_event. Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'include/linux/eventpoll.h')
-rw-r--r--include/linux/eventpoll.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/include/linux/eventpoll.h b/include/linux/eventpoll.h
index bc6d79b00c4e..8f000fada5a4 100644
--- a/include/linux/eventpoll.h
+++ b/include/linux/eventpoll.h
@@ -61,6 +61,15 @@ static inline void eventpoll_release(struct file *file)
eventpoll_release_file(file);
}
+int do_epoll_ctl(int epfd, int op, int fd, struct epoll_event *epds,
+ bool nonblock);
+
+/* Tells if the epoll_ctl(2) operation needs an event copy from userspace */
+static inline int ep_op_has_event(int op)
+{
+ return op != EPOLL_CTL_DEL;
+}
+
#else
static inline void eventpoll_init_file(struct file *file) {}