Can you mix calls to the Posix and native thread librariess?
807567Sep 25 2001 — edited Jul 8 2002Is it possible to mix calls to different thread libraries within the same process.
We have a shared library interface to our product which is called from a customers application. In order to provide a thread safety we need to protect global data in this library with a mutex. However we do not know which thread library (if any) will be used by the calling application.
If we used a Posix mutex in our library would it work if the calling application was implemented using non-Posix threads?
Are the Posix and Solaris thead header files different interfaces to the same underlying implementation?
What overheads are there loading the thread library when it is not needed? If for example the calling application was implemented without using threads.
Would we have to test our interface with the different thread implementations available? eg /usr/lib/lwp/libthread.so, /usr/lib/sparcv9/libthread.so as well as /usr/lib/libthread.so.