LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   Default thread library (https://www.linuxquestions.org/questions/linux-software-2/default-thread-library-535230/)

nuxrl 03-06-2007 08:06 PM

Default thread library
 
Not sure if this is the right forum to post this question...

When pthread_create() is called from user code, how can I find out which version of the implementation is used, LinuxThreads or NPTL?

If
Code:

$getconf GNU_LIBPTHREAD_VERSION
doesn't print anything, can I assume LinuxThreads is used as the default thread library?

Thank,

-n

studioj 03-07-2007 01:57 PM

that command gives a return on both.
Code:

$ getconf GNU_LIBPTHREAD_VERSION
linuxthreads-0.10

Code:

$ getconf GNU_LIBPTHREAD_VERSION
NPTL 2.3.6

like that so i guess you can just parse the output and determine the default.
for now at least most all linux systems use NPTL as default but also have linuxthreads as a fallback unless someone specifically compiles their glibc without linuxthreads or the system is very old and has linuxthreads only.


All times are GMT -5. The time now is 04:33 PM.