Writing a thread-safe library without pulling in pthreads

Florian Weimer fw@deneb.enyo.de
Fri Jul 18 12:56:00 GMT 2008


I'd like to write a library which only uses locking if the application
is linked against pthreads.  Is this possible?

(The implementation requires global state, so it's not possible to
expose a thread-safe API explicitly passing objects containing state.)



More information about the Gcc-help mailing list