History

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.

Jens Axboe committed 6 years ago

Commit 39220e81 parent 58e41a42 files · +42 −13Browse files

Showing the changes to include/linux (1 of 2 files). Show all

Unified · Split

include/linux/eventpoll.h+9−0
@@ -61,6 +61,15 @@ static inline void eventpoll_release(struct file *file) · 60 unmodified lines
6161 eventpoll_release_file(file);
6262 }
6363
64+int do_epoll_ctl(int epfd, int op, int fd, struct epoll_event *epds,
65+ bool nonblock);
66+
67+/* Tells if the epoll_ctl(2) operation needs an event copy from userspace */
68+static inline int ep_op_has_event(int op)
69+{
70+ return op != EPOLL_CTL_DEL;
71+}
72+
6473 #else
6574
6675 static inline void eventpoll_init_file(struct file *file) {}