From: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
To: Ian Jackson <ian.jackson@eu.citrix.com>
Cc: Jim Fehlig <jfehlig@suse.com>,
xen-devel@lists.xensource.com,
Ian Campbell <Ian.Campbell@citrix.com>
Subject: Re: [PATCH 2/3] libxl: fd events: Break out fd_occurs
Date: Fri, 17 Apr 2015 16:21:24 -0400 [thread overview]
Message-ID: <20150417202124.GA15386@l.oracle.com> (raw)
In-Reply-To: <1429208608-6185-3-git-send-email-ian.jackson@eu.citrix.com>
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@eu.citrix.com>
> CC: Jim Fehlig <jfehlig@suse.com>
> CC: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
> ---
> 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
>
next prev parent reply other threads:[~2015-04-17 20:21 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <[PATCH v2 0/3] libxl: fd events: Recheck fd events>
2015-04-16 18:23 ` <21807.61130.841852.546321@mariner.uk.xensource.com> Ian Jackson
2015-04-16 18:23 ` [PATCH 1/3] libxl: fd events: Break out libxl__fd_poll_recheck Ian Jackson
2015-04-17 9:01 ` Ian Campbell
2015-04-16 18:23 ` [PATCH 2/3] libxl: fd events: Break out fd_occurs Ian Jackson
2015-04-17 9:02 ` Ian Campbell
2015-04-17 20:21 ` Konrad Rzeszutek Wilk [this message]
2015-04-16 18:23 ` [PATCH 3/3] libxl: fd events: Suppress spurious fd events Ian Jackson
2015-04-17 9:17 ` Ian Campbell
2015-04-16 18:24 ` [PATCH v2 0/3] libxl: fd events: Recheck with poll Ian Jackson
2015-04-17 20:25 ` Konrad Rzeszutek Wilk
2015-04-22 14:23 ` Ian Campbell
2015-04-16 21:19 ` Jim Fehlig
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20150417202124.GA15386@l.oracle.com \
--to=konrad.wilk@oracle.com \
--cc=Ian.Campbell@citrix.com \
--cc=ian.jackson@eu.citrix.com \
--cc=jfehlig@suse.com \
--cc=xen-devel@lists.xensource.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.