Subj : Re: Difference between libpthread.so.0 and tls/libpthread.so.0 on SuSE-9.1 ? To : comp.programming.threads From : Paul Pluzhnikov Date : Thu Jan 13 2005 09:09 pm Izo writes: > > One is LinuxThreads, one is NPTL. > > Thanks. That is evident but what bothers me is that my program works > with the first but not the other one. This is most likely due to a bug in your program. > Running > without debugger shows that some threads do start but crash afterwards. Let them coredump and analyze the core. Also see if valgrind can find this bug for you. > I can't even determine where and how to start to crack this problem - Write a trivial "Hello world" program, and convince yourself that there is nothing wrong with the NPTL pthreads. Now either decrease complexity of your program until it starts working, or increase complexity of the "hello" until it stops. >Should the > thread working resources be set in any way different to the > LinuxThreads ? No. It should not make any difference for correctly-written application. Make sure your app does not depend on actual pthread_t values (they are small integers, e.g. 1024, 4095, etc. under LinuxThreads, but pointer values under NPTL). Also make sure you do not depend on getpid() returning different values in different threads (under LinuxThreads getpid() POSIX-incorrectly returns different value; under NPTL it correctly returns the same value). > I have searched through the manpages and I can really not see any > difference in using these functions in LT or NPTL. There is no difference from the application writer's perspective. Cheers, -- In order to understand recursion you must first understand recursion. Remove /-nsp/ for email. .