Subj : Re: Real cause of spurious wakeups To : comp.programming.threads From : ghost Date : Mon Apr 18 2005 06:00 am > > - why wait of futex returns on signals? > The futex() caller may want to respond to the signal. Also signal > handling can involve calling user-space code, which may make it hard > to preserve the in-kernel context of the futex() call. Ok, the second argument sounds reasonable. > > - as you indicate, cond_wait returns on EINTR just because it's allowed to. > > Would be possible to waits on futex again in that case. > No, because a notification might be missed. Ehmm.. indeed! Thanks for explaining. This is indeed valid reason for spurious wakeups. I'd still be interested to know the if that's the reason hinted on everywhere, or there are other cases. Thanks, Volodya .