[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20200212102912.GA464050@stefanha-x1.localdomain>
Date: Wed, 12 Feb 2020 10:29:12 +0000
From: Stefan Hajnoczi <stefanha@...il.com>
To: Paolo Bonzini <pbonzini@...hat.com>
Cc: Stefan Hajnoczi <stefanha@...hat.com>,
linux-fsdevel@...r.kernel.org, kvm@...r.kernel.org,
linux-kernel@...r.kernel.org, Avi Kivity <avi@...lladb.com>,
Davide Libenzi <davidel@...ilserver.org>,
Alexander Viro <viro@...iv.linux.org.uk>
Subject: Re: [RFC] eventfd: add EFD_AUTORESET flag
On Wed, Feb 12, 2020 at 09:31:32AM +0100, Paolo Bonzini wrote:
> On 29/01/20 18:20, Stefan Hajnoczi wrote:
> > + /* Semaphore semantics don't make sense when autoreset is enabled */
> > + if ((flags & EFD_SEMAPHORE) && (flags & EFD_AUTORESET))
> > + return -EINVAL;
> > +
>
> I think they do, you just want to subtract 1 instead of setting the
> count to 0. This way, writing 1 would be the post operation on the
> semaphore, while poll() would be the wait operation.
True! Then EFD_AUTORESET is not a fitting name. EFD_AUTOREAD or
EFD_POLL_READS?
Stefan
Download attachment "signature.asc" of type "application/pgp-signature" (489 bytes)
Powered by blists - more mailing lists