Messages in this thread | | | Date | Mon, 24 Aug 2009 15:32:46 -0700 (PDT) | From | Davide Libenzi <> | Subject | Re: [PATCH 0/2] eventfd: new EFD_STATE flag |
| |
On Tue, 25 Aug 2009, Paolo Bonzini wrote:
> > > There are userspace libraries that do almost everything, but you hardly > > see things like pthread_(EFD_STATE-like)_create() or similar system > > interfaces based on such abstraction. > > It actually seems as close to a condition variable as an eventfd can be.
A pthread condition typical code usage maps to eventfd like:
while (read(efd, ...) > 0) if (CONDITION) break;
So a pthread condition is really a wakeup gate like eventfd is. EFD_STATE has nothing to do with a pthread condition.
- Davide
| |