qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] eventfd_signal()


From: Paolo Bonzini
Subject: Re: [Qemu-devel] eventfd_signal()
Date: Fri, 08 May 2015 13:32:11 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.5.0


On 08/05/2015 13:24, Paolo Bonzini wrote:
> 
> 
> 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.

Oops, EAGAIN...

Paolo



reply via email to

[Prev in Thread] Current Thread [Next in Thread]