pthread_cond_timedwait vs pthread_mutex_timedlock

Mike Frysinger
Mon May 4 23:44:00 GMT 2009

On Monday 04 May 2009 15:26:06 Borislav Trifonov wrote:
> But if the thread can just be woken when a condition occurs, then why is a
> mutex even needed?

waking at the right time does not guarantee exclusion, it just most often 
works out that way.  mutexes however absolutely guarantee exclusion.

More information about the Libc-help mailing list