From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:34197) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YqgOy-0007Au-1W for qemu-devel@nongnu.org; Fri, 08 May 2015 07:25:10 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YqgOs-0006Dx-Gr for qemu-devel@nongnu.org; Fri, 08 May 2015 07:25:07 -0400 Received: from mail-wi0-x22b.google.com ([2a00:1450:400c:c05::22b]:34000) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YqgOs-0006DE-AH for qemu-devel@nongnu.org; Fri, 08 May 2015 07:25:02 -0400 Received: by wicmx19 with SMTP id mx19so34373438wic.1 for ; Fri, 08 May 2015 04:25:01 -0700 (PDT) Sender: Paolo Bonzini Message-ID: <554C9D0B.205@redhat.com> Date: Fri, 08 May 2015 13:24:59 +0200 From: Paolo Bonzini MIME-Version: 1.0 References: In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] eventfd_signal() List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Catalin Vasile , qemu-devel@nongnu.org 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