Suse 9.3 Threads (Linux or NPTL) question
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Now that I've switched emails, hopefully this goes through.. I posted it in alt.os.linux.suse, but if I can this through it probably belongs here instead... I was reading this months issue of Dr. Dobb's and they have an interesting (at least for me ;^) article on Linux threads. So I went my development machine and did the test they provided. According to the program they had in the listing (tested the thread PID with the process PID) and it reported that I was running with LinuxThreads however when I : getconf GNU_LIBPTHREAD_VERSION I got NPTL 2.3.4. Specs: gcc -v Reading specs from /usr/lib/gcc-lib/i586-suse-linux/3.3.5/specs Configured with: ../configure --enable-threads=posix --prefix=/usr - --with-local-prefix=/usr/local --infodir=/usr/share/info - --mandir=/usr/share/man --enable-languages=c,c++,f77,objc,java,ada - --disable-checking --libdir=/usr/lib --enable-libgcj --with-slibdir=/lib - --with-system-zlib --enable-shared --enable-__cxa_atexit i586-suse-linux Thread model: posix gcc version 3.3.5 20050117 (prerelease) (SUSE Linux) glibc ver 2.3.4-23.4 kernel 2.6.11.4-21.7-default KDEVELOP 3.2.1 KDE 3.4.1 level "a" with -lpthread as a compile option checking Glibc /lib/libc.so.6 reports that it is using linuxthreads. when I set the CFLAGS to -pthread -l/usr/include//nptl -L/usr/lib/nptl and compile I still get that it is using the linuxthreads and not nptl. I found one thread on another subject where they said that if I was using the i586 version of glibc it would use LinuxThreads instead of NPTL. To get around this they said to use the i686 version. Problem is I am already using it. Am I missing something.. Or totally missing the point??? - -- Quis custodiet ipsos custodes ?To announce that there must be no criticism of the president, or that we are to stand by the president, right or wrong, is not only unpatriotic and servile, but is morally treasonable to the American public.? [Theodore Roosevelt] 1918 Adolph & Sharon Weidanz SuSE 9.2 '78 43' Endeavour Ketch Folding@Home Team 45 S/V Time To Paws -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.5 (GNU/Linux) Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org iD8DBQFC5qPAlC+PSm9+eB0RAsHMAJ41bObcqdpJcsRx4N/IJIMBDUEdxgCcDVN8 MOTRCjfoLk/E5EwPEoea0e4= =vTzM -----END PGP SIGNATURE-----
On Tuesday 26 July 2005 4:57 pm, Adolph Weidanz wrote:
Now that I've switched emails, hopefully this goes through.. I posted it in alt.os.linux.suse, but if I can this through it probably belongs here instead...
I was reading this months issue of Dr. Dobb's and they have an interesting (at least for me ;^) article on Linux threads. So I went my development machine and did the test they provided. According to the program they had in the listing (tested the thread PID with the process PID) and it reported that I was running with LinuxThreads however when I
: getconf GNU_LIBPTHREAD_VERSION I got NPTL 2.3.4.
Specs: gcc -v Reading specs from /usr/lib/gcc-lib/i586-suse-linux/3.3.5/specs Configured with: ../configure --enable-threads=posix --prefix=/usr --with-local-prefix=/usr/local --infodir=/usr/share/info --mandir=/usr/share/man --enable-languages=c,c++,f77,objc,java,ada --disable-checking --libdir=/usr/lib --enable-libgcj --with-slibdir=/lib --with-system-zlib --enable-shared --enable-__cxa_atexit i586-suse-linux Thread model: posix gcc version 3.3.5 20050117 (prerelease) (SUSE Linux) glibc ver 2.3.4-23.4 kernel 2.6.11.4-21.7-default KDEVELOP 3.2.1 KDE 3.4.1 level "a" with -lpthread as a compile option Both LinuxThreads and NPTL is installed, but you will get some NPTL behavior unless you specifically build with nptl (highly recommended).
-- Jerry Feldman <gaf@blu.org> Boston Linux and Unix user group http://www.blu.org PGP key id:C5061EA9 PGP Key fingerprint:053C 73EC 3AC1 5C44 3E14 9245 FB00 3ED5 C506 1EA9
Jerry Feldman wrote:
I was reading this months issue of Dr. Dobb's and they have an interesting (at least for me ;^) article on Linux threads. So I went my development machine and did the test they provided. According to the program they had in the listing (tested the thread PID with the process PID) and it reported that I was running with LinuxThreads however when I Both LinuxThreads and NPTL is installed, but you will get some NPTL behavior unless you specifically build with nptl (highly recommended).
Sorry I was to fast with the send key... Is there a FAQ or HOWTO on how specify to use the NPTL? I tried setting the CFLAGS to -pthread -l/usr/include//nptl -L/usr/lib/nptl and compiling, I still get that it is using the linuxthreads and not nptl. Thanks again.. -- Quis custodiet ipsos custodes “To announce that there must be no criticism of the president, or that we are to stand by the president, right or wrong, is not only unpatriotic and servile, but is morally treasonable to the American public.” [Theodore Roosevelt] 1918 Adolph & Sharon Weidanz SuSE 9.2 '78 43' Endeavour Ketch Folding@Home Team 45 S/V Time To Paws
Sorry I was to fast with the send key... Is there a FAQ or HOWTO on how specify to use the NPTL? I tried setting the CFLAGS to -pthread -l/usr/include//nptl -L/usr/lib/nptl and compiling, I still get that it is using the linuxthreads and not nptl. Thanks again.. You should be getting nptl. I ran some benchmark tests a while back for a
On Tuesday 26 July 2005 8:26 pm, Adolph & Sharon Weidanz wrote: porting guide. -- Jerry Feldman <gaf@blu.org> Boston Linux and Unix user group http://www.blu.org PGP key id:C5061EA9 PGP Key fingerprint:053C 73EC 3AC1 5C44 3E14 9245 FB00 3ED5 C506 1EA9
You run with NPTL, check: LD_DEBUG=libs ./your-app There's a lib in /lib/i686/libpthread that will be used for general. So, you build against linuxthreads but run with nptl, Andreas -- Andreas Jaeger, aj@suse.de, http://www.suse.de/~aj SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany GPG fingerprint = 93A3 365E CE47 B889 DF7F FED1 389A 563C C272 A126
participants (4)
-
Adolph & Sharon Weidanz
-
Adolph Weidanz
-
Andreas Jaeger
-
Jerry Feldman