Commit f10b348e authored by Mike Rapoport's avatar Mike Rapoport Committed by Andrei Vagin

util: introduce epoll_del_rfd

travis-ci: success for lazy-pages: add non-#PF events handling (rev2)
Signed-off-by: 's avatarMike Rapoport <rppt@linux.vnet.ibm.com>
Signed-off-by: 's avatarPavel Emelyanov <xemul@virtuozzo.com>
parent fb90982d
...@@ -323,6 +323,7 @@ struct epoll_rfd { ...@@ -323,6 +323,7 @@ struct epoll_rfd {
}; };
extern int epoll_add_rfd(int epfd, struct epoll_rfd *); extern int epoll_add_rfd(int epfd, struct epoll_rfd *);
extern int epoll_del_rfd(int epfd, struct epoll_rfd *rfd);
extern int epoll_run_rfds(int epfd, struct epoll_event *evs, int nr_fds, int tmo); extern int epoll_run_rfds(int epfd, struct epoll_event *evs, int nr_fds, int tmo);
extern int epoll_prepare(int nr_events, struct epoll_event **evs); extern int epoll_prepare(int nr_events, struct epoll_event **evs);
......
...@@ -1228,6 +1228,16 @@ int epoll_add_rfd(int epfd, struct epoll_rfd *rfd) ...@@ -1228,6 +1228,16 @@ int epoll_add_rfd(int epfd, struct epoll_rfd *rfd)
return 0; return 0;
} }
int epoll_del_rfd(int epfd, struct epoll_rfd *rfd)
{
if (epoll_ctl(epfd, EPOLL_CTL_DEL, rfd->fd, NULL) == -1) {
pr_perror("epoll_ctl failed");
return -1;
}
return 0;
}
int epoll_run_rfds(int epollfd, struct epoll_event *evs, int nr_fds, int timeout) int epoll_run_rfds(int epollfd, struct epoll_event *evs, int nr_fds, int timeout)
{ {
int ret, i, nr_events; int ret, i, nr_events;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment