This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: pthread weak symbols


On Wed, 2015-12-09 at 15:20 -0800, Matt Turner wrote:
> I'm interested in avoiding pthread/locking overhead in Mesa
> (http://mesa3d.org/) when the application is not using threads.
> 
> I've read about glibc's weak pthread symbols that are intended to
> solve this problem, but I've also read on this list that they weren't
> a good idea and have some (unknown to me) problems.
> 
> Can I get some clarification about what problems there are with the
> weak pthread symbols, and perhaps some suggested alternative
> solutions?


One catch I've noticed with the pthread locking symbols in libc is that
they only work for non-recursive mutexes. If your project requires a
recursive mutex you couldn't use them.

regards,
Nikos

PS. a more detailed description at: https://bugzilla.redhat.com/show_bug.cgi?id=1241075



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]