RE: Pollable Semaphores

2005-01-24 Thread Robert White
The other obvious problem is that if there are contenders on the semaphore, the semaphore may well not remain acquirable between the return from select and the call to actually acquire the semaphore. What I'd think you need is a "device" that you open, then attach a semaphore to (with an ioctl()

Re: Pollable Semaphores

2005-01-22 Thread Chris Wright
* Ulrich Drepper ([EMAIL PROTECTED]) wrote: > On Fri, 21 Jan 2005 23:05:04 -0800, Chris Wright <[EMAIL PROTECTED]> wrote: > > Yeah, here it is. I refreshed it against a current kernel. It passes my > > same old test, where I select on /proc//status fd in exceptfds. > > Looks certainly attractive

Re: Pollable Semaphores

2005-01-21 Thread Ulrich Drepper
On Fri, 21 Jan 2005 23:05:04 -0800, Chris Wright <[EMAIL PROTECTED]> wrote: > Yeah, here it is. I refreshed it against a current kernel. It passes my > same old test, where I select on /proc//status fd in exceptfds. Looks certainly attractive to me. Nice small patch. How quickly after the deat

Re: Pollable Semaphores

2005-01-21 Thread Chris Wright
* Chris Wright ([EMAIL PROTECTED]) wrote: > * Ulrich Drepper ([EMAIL PROTECTED]) wrote: > > And is another thing to consider. There is at least one other event > > which should be pollable: process (maybe threads) deaths. I was > > hoping that we get support for this, perhaps in the form of polli

Re: Pollable Semaphores

2005-01-21 Thread Chris Wright
* Ulrich Drepper ([EMAIL PROTECTED]) wrote: > And is another thing to consider. There is at least one other event > which should be pollable: process (maybe threads) deaths. I was > hoping that we get support for this, perhaps in the form of polling > the /proc/PID directory. For poll(), a POLLE

Re: Pollable Semaphores

2005-01-21 Thread Ulrich Drepper
On Fri, 21 Jan 2005 17:17:51 -0600, Brent Casavant <[EMAIL PROTECTED]> wrote: > 2. select/poll on the fd return EWOULDBLOCK if the current value of > the futex is not equal to the value of interest. Otherwise it > behaves as FUTEX_FD currently does. This is the problematic part. The

Re: Pollable Semaphores

2005-01-21 Thread Davide Libenzi
lity. The API consists of a handful of calls for creation and > destruction of pollable semaphores, as well as a means to attach them > to a file descriptor. Beyond that, from the users point of view, they're > just treated as any other file descriptor. > > These calls are route

Re: Pollable Semaphores

2005-01-21 Thread Brent Casavant
On Fri, 21 Jan 2005, Roland Dreier wrote: > Brandon> I'm trying to find out if there is a pollable semaphore > Brandon> equivalent on Linux. The main idea of a "pollable > Brandon> semaphore", is a semaphore with a related file > Brandon> descriptor. The file descriptor can be us

Re: Pollable Semaphores

2005-01-21 Thread Roland Dreier
Brandon> I'm trying to find out if there is a pollable semaphore Brandon> equivalent on Linux. The main idea of a "pollable Brandon> semaphore", is a semaphore with a related file Brandon> descriptor. The file descriptor can be used to select() Brandon> when the semaphore is a

Pollable Semaphores

2005-01-21 Thread Brandon Corey
ay for users to implement code synchronization between threads, where multiple file descriptors are already being selected against. We have a pollable semaphore implementation on IRIX that provides this functionality. The API consists of a handful of calls for creation and destruction of pollable semaphore