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

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

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

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/pid/status fd in exceptfds. Looks certainly attractive to

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

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

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

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.

Re: Pollable Semaphores

2005-01-21 Thread Davide Libenzi
On Fri, 21 Jan 2005, Brandon Corey wrote: > I'm trying to find out if there is a pollable semaphore equivalent on Linux. > > The main idea of a "pollable semaphore", is a semaphore with a related > file descriptor. The file descriptor can be used to select() when the > semaphore is acquirable.

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

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

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

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 used to

Re: Pollable Semaphores

2005-01-21 Thread Davide Libenzi
On Fri, 21 Jan 2005, Brandon Corey wrote: I'm trying to find out if there is a pollable semaphore equivalent on Linux. The main idea of a pollable semaphore, is a semaphore with a related file descriptor. The file descriptor can be used to select() when the semaphore is acquirable. This

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 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 POLLERR

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 polling

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/pid/status fd in exceptfds. Looks certainly attractive to me. Nice small patch. How quickly after the