From: Paolo Bonzini <pbonzini@redhat.com>
To: Catalin Vasile <catalinvasile92@gmail.com>, qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] eventfd_signal()
Date: Fri, 08 May 2015 13:24:59 +0200 [thread overview]
Message-ID: <554C9D0B.205@redhat.com> (raw)
In-Reply-To: <CAOMf8trkSoU0=pCS8PdakO2ZGEefdgJ3SyQfQExEZ3DZNP2coA@mail.gmail.com>
On 08/05/2015 12:58, Catalin Vasile wrote:
> Is eventfd blocking? By that I mean: If I signal the guest for
> something, will that thread remain blocked till the guest clears the
> interrupt?
No. If you want that, write 2^64-2 to the eventfd and do a
pfd.fd = ...
pfd.events = POLLOUT;
poll(&pfd, 1, -1);
after the write.
With this algorithm, a write will fail with EINVAL if there is already
another pending write somewhere. The "poll" will still work after the
failed write.
Paolo
next prev parent reply other threads:[~2015-05-08 11:25 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-05-08 10:58 [Qemu-devel] eventfd_signal() Catalin Vasile
2015-05-08 11:24 ` Paolo Bonzini [this message]
2015-05-08 11:32 ` Paolo Bonzini
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=554C9D0B.205@redhat.com \
--to=pbonzini@redhat.com \
--cc=catalinvasile92@gmail.com \
--cc=qemu-devel@nongnu.org \
/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.