[CRIU] [PATCH 2/5] util: epoll: rename revent to read event
Mike Rapoport
rppt at linux.vnet.ibm.com
Wed Nov 22 22:37:09 MSK 2017
A bit more readable and will be easy to distinguish from upcoming
hevent^Whangup_event.
Signed-off-by: Mike Rapoport <rppt at linux.vnet.ibm.com>
---
criu/include/util.h | 8 +++++++-
criu/page-xfer.c | 2 +-
criu/uffd.c | 2 +-
criu/util.c | 2 +-
4 files changed, 10 insertions(+), 4 deletions(-)
diff --git a/criu/include/util.h b/criu/include/util.h
index 20684cc..cf24ed1 100644
--- a/criu/include/util.h
+++ b/criu/include/util.h
@@ -326,7 +326,13 @@ int setup_tcp_client(char *addr);
struct epoll_rfd {
int fd;
- int (*revent)(struct epoll_rfd *);
+ /*
+ * EPOLLIN notification. The data is available for read in
+ * rfd->fd.
+ * @return 0 to resume polling, 1 to stop polling or a
+ * negative error code
+ */
+ int (*read_event)(struct epoll_rfd *);
};
extern int epoll_add_rfd(int epfd, struct epoll_rfd *);
diff --git a/criu/page-xfer.c b/criu/page-xfer.c
index 0215dfd..aa5815f 100644
--- a/criu/page-xfer.c
+++ b/criu/page-xfer.c
@@ -1221,7 +1221,7 @@ int connect_to_page_server_to_recv(int epfd)
return -1;
ps_rfd.fd = page_server_sk;
- ps_rfd.revent = page_server_async_read;
+ ps_rfd.read_event = page_server_async_read;
return epoll_add_rfd(epfd, &ps_rfd);
}
diff --git a/criu/uffd.c b/criu/uffd.c
index ee6d2b9..9c1bbe0 100644
--- a/criu/uffd.c
+++ b/criu/uffd.c
@@ -114,7 +114,7 @@ static struct lazy_pages_info *lpi_init(void)
INIT_LIST_HEAD(&lpi->iovs);
INIT_LIST_HEAD(&lpi->reqs);
INIT_LIST_HEAD(&lpi->l);
- lpi->lpfd.revent = handle_uffd_event;
+ lpi->lpfd.read_event = handle_uffd_event;
return lpi;
}
diff --git a/criu/util.c b/criu/util.c
index 2bd56f6..3f490ea 100644
--- a/criu/util.c
+++ b/criu/util.c
@@ -1362,7 +1362,7 @@ int epoll_run_rfds(int epollfd, struct epoll_event *evs, int nr_fds, int timeout
struct epoll_rfd *rfd;
rfd = (struct epoll_rfd *)evs[i].data.ptr;
- ret = rfd->revent(rfd);
+ ret = rfd->read_event(rfd);
if (ret < 0)
goto out;
if (ret > 0)
--
2.7.4
More information about the CRIU
mailing list