[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-devel] [PATCH v2 01/10] libxl: event: Rename poller.fds_changed to .fds_deregistered
This is only for deregistration. We are going to add another variable for new events, with different semantics, and this overly-general name will become confusing. Signed-off-by: Ian Jackson <ian.jackson@xxxxxxxxxxxxx> --- tools/libxl/libxl_event.c | 8 ++++---- tools/libxl/libxl_internal.h | 6 +++--- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/tools/libxl/libxl_event.c b/tools/libxl/libxl_event.c index aa8b7d1945..1210c1bfb3 100644 --- a/tools/libxl/libxl_event.c +++ b/tools/libxl/libxl_event.c @@ -239,7 +239,7 @@ void libxl__ev_fd_deregister(libxl__gc *gc, libxl__ev_fd *ev) ev->fd = -1; LIBXL_LIST_FOREACH(poller, &CTX->pollers_fds_changed, fds_changed_entry) - poller->fds_changed = 1; + poller->fds_deregistered = 1; out: CTX_UNLOCK; @@ -1120,7 +1120,7 @@ static int beforepoll_internal(libxl__gc *gc, libxl__poller *poller, *nfds_io = used; - poller->fds_changed = 0; + poller->fds_deregistered = 0; libxl__ev_time *etime = LIBXL_TAILQ_FIRST(&CTX->etimes); if (etime) { @@ -1186,7 +1186,7 @@ static int afterpoll_check_fd(libxl__poller *poller, /* again, stale slot entry */ continue; - assert(poller->fds_changed || !(fds[slot].revents & POLLNVAL)); + assert(poller->fds_deregistered || !(fds[slot].revents & POLLNVAL)); /* we mask in case requested events have changed */ int slot_revents = fds[slot].revents & events; @@ -1626,7 +1626,7 @@ int libxl__poller_init(libxl__gc *gc, libxl__poller *p) int rc; p->fd_polls = 0; p->fd_rindices = 0; - p->fds_changed = 0; + p->fds_deregistered = 0; rc = libxl__pipe_nonblock(CTX, p->wakeup_pipe); if (rc) goto out; diff --git a/tools/libxl/libxl_internal.h b/tools/libxl/libxl_internal.h index ba8c9b41ab..c5b71d15f0 100644 --- a/tools/libxl/libxl_internal.h +++ b/tools/libxl/libxl_internal.h @@ -629,14 +629,14 @@ struct libxl__poller { /* * We also use the poller to record whether any fds have been * deregistered since we entered poll. Each poller which is not - * idle is on the list pollers_fds_changed. fds_changed is + * idle is on the list pollers_fds_changed. fds_deregistered is * cleared by beforepoll, and tested by afterpoll. Whenever an fd - * event is deregistered, we set the fds_changed of all non-idle + * event is deregistered, we set the fds_deregistered of all non-idle * pollers. So afterpoll can tell whether any POLLNVAL is * plausibly due to an fd being closed and reopened. */ LIBXL_LIST_ENTRY(libxl__poller) fds_changed_entry; - bool fds_changed; + bool fds_deregistered; }; struct libxl__gc { -- 2.11.0 _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxxxxxxxxx https://lists.xenproject.org/mailman/listinfo/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |