Subj : Re: redhat linux standard C library does not have pthread_mutex_trylock ??? To : comp.programming.threads From : Joe Seigh Date : Tue Feb 08 2005 11:44 am On 8 Feb 2005 08:28:34 -0800, wrote: > Thanks Paul, that 'weak-link' thing works! > > Just wondering why the standard C library does not provide this > automatically same as all other pthread functions, is there any > technical reason? > > Probably because it wasn't meant for general usage. It's only there so they could make some library calls thread-safe by wrapping the function with a lock/unlock pair. If you assume restricted usage then you can dummy up part of the pthreads api. You can't dummy up all of it. What do you think pthread_cond_wait is supposed to do in that case? -- Joe Seigh Lock-free synchronization primitives http://atomic-ptr-plus.sourceforge.net/ .