Also make it available outside of epoll, along with the helper that decides if we need to copy the passed in epoll_event.
Showing the changes to include/linux (1 of 2 files). Show all
Unified · Split
| @@ -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 | ||
| 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 | |||
| 64 | #else | 73 | #else |
| 65 | 74 | ||
| 66 | static inline void eventpoll_init_file(struct file *file) {} | 75 | static inline void eventpoll_init_file(struct file *file) {} |