Subj : redhat linux standard C library does not have pthread_mutex_trylock ??? To : comp.programming.threads From : outsiderjustice Date : Mon Feb 07 2005 06:34 am Hi All, I have developed a general library that is MT safe and used standard Pthread calls, this library can be used in both MT programs (link with -lpthread) or single thread programs (without -lpthread, the standard C library provided the dummy implementation for the pthread functions), this works fine on Solaris; however, when we are porting the system onto Linux (redhat), we got a problem because the standard C library does not have pthread_mutex_trylock defined (while all the other pthread_mutex_xxx functions are defined), this has forced us to link -lpthread with all the programs, even though the program is only meant to be single thread application. Now the questions are: - Does someone know such a list of pthread functions not defined in the standard C library? - Is this a problem or a feathure of Linux? (I'm quite new to Linux development) I tried several versions they all have this same issue. If it's a problem, what's the well-known solution? - What's the overhead of linking a single thread app with -lpthread (thus forced it to be MT even though there's only one user thread)? - Does Linux encourage people to develop MT applications? Thanks a lot. - OJ .