From: Biswapesh C. <bis...@tc...> - 2003-04-07 04:22:43
|
IIRC, the wine folks have a reasonable configure time check for NPTL in CVS, so maybe you can simply swipe their code ? Of course, the issue they are facing is that what if the program (wine/valgrind) is compiled with one kind of threading support and the binary shipped to a system with a different type of threading ? Basically, in that case, you need a runtime check as well. > On Sunday 06 April 2003 6:48 pm, Robert Walsh wrote: > > > Anyone have a reliable check easily to hand? > > > > Yeugh. I don't know if this is reliable, but pthread_tryjoin_np is > > implemented in nptl but not in the original pthread stuff. Perhaps a > > check for that will let you know? It will certainly let you know if > > pthread_tryjoin_np is implemented, but you might allow yourself to infer > > from that that it's nptl... :-) > > Hmm. Sounds a plausible scheme, but ... > > On the one hand (on RH 9), nm /lib/tls/libpthread.so.0 | grep tryjoin > shows pthread_tryjoin_np as an exported text symbol ("T"). > > On the other hand, you can't link against it: > > sewardj@localhost:~/VgHEAD/valgrind$ cat nptltest.c > > #include <pthread.h> > extern int pthread_tryjoin_np; > int main (int argc, char * argv ) > { > int* p = (int*)(& pthread_tryjoin_np); > return 0; > } > > sewardj@localhost:~/VgHEAD/valgrind$ gcc -o nptltest nptltest.c > -lpthread > /tmp/ccWjnvw9.o(.text+0x13): In function `main': > : undefined reference to `pthread_tryjoin_np' > collect2: ld returned 1 exit status > > Now what? If the symbol is in the DSO, why can't I link to it? > Mystified. > > J > > > > ------------------------------------------------------- > This SF.net email is sponsored by: ValueWeb: > Dedicated Hosting for just $79/mo with 500 GB of bandwidth! > No other company gives more support or power for your dedicated server > http://click.atdmt.com/AFF/go/sdnxxaff00300020aff/direct/01/ > _______________________________________________ > Valgrind-users mailing list > Val...@li... > https://lists.sourceforge.net/lists/listinfo/valgrind-users -- Biswa. |