mirror of
https://github.com/lkl/linux.git
synced 2025-12-19 16:13:19 +09:00
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>
This commit is contained in:
@@ -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) {}
|
||||
|
||||
Reference in New Issue
Block a user