[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH 2/3] libxl: fd events: Break out fd_occurs
On Thu, Apr 16, 2015 at 07:23:27PM +0100, Ian Jackson wrote: > No functional change, only code motion. > > Currently, contrary to this function's name, there are two sites where > efd->func() is called so one of them doesn't go through here just yet. > That will be dealt with in the next commit. s/next commit/"libxl: fd events: Suppress spurious fd events"/ > > Signed-off-by: Ian Jackson <Ian.Jackson@xxxxxxxxxxxxx> > CC: Jim Fehlig <jfehlig@xxxxxxxx> > CC: Konrad Rzeszutek Wilk <konrad.wilk@xxxxxxxxxx> > --- > tools/libxl/libxl_event.c | 13 +++++++++---- > 1 file changed, 9 insertions(+), 4 deletions(-) > > diff --git a/tools/libxl/libxl_event.c b/tools/libxl/libxl_event.c > index 3efb357..2b2254e 100644 > --- a/tools/libxl/libxl_event.c > +++ b/tools/libxl/libxl_event.c > @@ -1121,6 +1121,14 @@ static int afterpoll_check_fd(libxl__poller *poller, > return revents; > } > > +static void fd_occurs(libxl__egc *egc, libxl__ev_fd *efd, short revents) > +{ > + DBG("ev_fd=%p occurs fd=%d events=%x revents=%x", > + efd, efd->fd, efd->events, revents); > + > + efd->func(egc, efd, efd->fd, efd->events, revents); > +} > + > static void afterpoll_internal(libxl__egc *egc, libxl__poller *poller, > int nfds, const struct pollfd *fds, > struct timeval now) > @@ -1183,10 +1191,7 @@ static void afterpoll_internal(libxl__egc *egc, > libxl__poller *poller, > break; > > found_fd_event: > - DBG("ev_fd=%p occurs fd=%d events=%x revents=%x", > - efd, efd->fd, efd->events, revents); > - > - efd->func(egc, efd, efd->fd, efd->events, revents); > + fd_occurs(egc, efd, revents); > } > > if (afterpoll_check_fd(poller,fds,nfds, poller->wakeup_pipe[0],POLLIN)) { > -- > 1.7.10.4 > _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx http://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |