Re: [suse-programming-e] linux Threads vs. NPTL

--- Jerry Feldman <gaf@blu.org> wrote:
On Friday 04 March 2005 10:51 am, Dimych wrote:
I had understood your point :) When saying "...that will prevent a program from linking with the Linux Threads library..." what exact errors are you getting? I though it's possible to link your programm against both those libraries at the same time. There are some functions that exist in NPTL and not in Linux Threads. If you compile using only the Linux Threads libary (eg. /usr/lib/libpthread.so), and you code uses the function, pthread_tryjoin_np(), it will fail to link.
This is preatty clear. But I do not understand what you are trying to accomplish. You are saying that you want to use some additional functions from NPTL - that's fine. In this case you HAVE to link against NPTL. If you do not use those additional features you can link against either library. Are you trying to write some sort of wrapper to create an independent threads layer and use NPTL if it's available and if it is not try to emulate it's functionality using Linux Threads?
What I am really looking for is a way to detect at run time, if the code has been linked with the nptl library or not.
This part actually confuses me. You either linked your programm against NPTL or Linux threads library. If, lets say, you compiled it with NPTL and user's system does not support this library you would not even be able to start the program, so would not be able to use a function to test if you are using NPTL or not evet if it would exist. Dmitry
-- Jerry Feldman <gaf@blu.org>
participants (1)
-
Dimych