[lkml]   [2007]   [May]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: second, bigger problem with private futexes
Ulrich Drepper a écrit :
> Hash: SHA1
> This one is a big problem:
> If I understand the code correctly, a FUTEX_CMP_REQUEUE from a private
> futex will add the waiters to the other futex as a private futex. And
> similarly for shared.
> I.e., it is not possible to have one futex private and the other shared.
> This is a huge problem. The shared/private status of a conditional
> variable and the mutex used with it don't have to match. But this is
> where FUTEX_CMP_REQUEUE is used.
> If this is not changed (assuming I'm right with my analysis of the
> kernel code) this means mutexes and condvars will not be able to use
> private futexes.

Do you mean POSIX allowed to mix PROCESS_PRIVATE and PROCESS_SHARED condvar
and mutexes ? Seems silly to me :(

> What would be needed is an additional parameter for FUTEX_CMP_REQUEUE
> and FUTEX_CMP_REQUEUE_PI which specifies the state (shared/private) of
> the target futex. The original futex' state is encoded in the command

Well, I guess it should be easy to add this if really necessary.

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

 \ /
  Last update: 2007-05-21 20:19    [from the cache]
©2003-2014 Jasper Spaans. hosted at Digital Ocean