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
61 eventpoll_release_file(file);61 eventpoll_release_file(file);
62}62}
63 63
64int 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 */
68static inline int ep_op_has_event(int op)
69{
70 return op != EPOLL_CTL_DEL;
71}
72
64#else73#else
65 74
66static inline void eventpoll_init_file(struct file *file) {}75static inline void eventpoll_init_file(struct file *file) {}