Subj : Re: Either I'm stupid, or NPTL 0.29 on RH9 is broken! To : comp.programming.threads From : Joseph Seigh Date : Tue Jan 25 2005 01:44 pm On 25 Jan 2005 09:38:12 -0800, Greg Law wrote: > Nope -- adding the sched_yield makes no difference. While not holding the mutex? Usually works for me. > > Also, given that I'm running on an SMP machine, I would (perhaps > naively?) have expected the scheduler to allow the other CPU in when > the mutex was released. (The second CPU is shown as pretty much > completely idle). > > Also, changing the signal to a broadcast "fixes" it -- evidence that > the pthread_cond_signal is going astray. broadcast does wait morphing. A slightly different mechanism. > > I do take the point that strictly speaking this can be seen as > conformant behavior -- POSIX gives no guarantees about "fairness" of > scheduling. However, it strikes me as not the behavior would normally > expect! > Well you could try my fastcv condvar as an alternate Posix cvar implementation here http://atomic-ptr-plus.sourceforge.net/ It's futex based. It doesn't support process shared cvars yet. It's still pre-alpha so don't use it in production. -- Joe Seigh .