well, then we have a refcounting issue on pid , or problem in pid reuse.
This analysis seems unfair to me, after a quick reading of glibc code.
Right now, glibc cannot use FUTEX_CMP_REQUEUE if condvar is pshared.
/* Do not use requeue for pshared condvars. */
if (cond->__data.__mutex == (void *) ~0l)
goto wake_all;
So how introducing private futexes is penalizing this case ?
Fact is that if condvar is pshared, we *cannot* use CMP_REQUEUE since threads
doing the broadcast() can be in a separate process and virtual address of
mutex of waiting threads could point to unrelated memory.
Thanks
-