This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
RE: noreentrant functions on Linux Advance Server 2.1 using gcc 2.96
- From: Eljay Love-Jensen <eljay at adobe dot com>
- To: Jyotirmoy Das <Jyotirmoy_Das at infosys dot com>
- Cc: gcc-help at gcc dot gnu dot org
- Date: Fri, 26 Mar 2004 07:16:50 -0600
- Subject: RE: noreentrant functions on Linux Advance Server 2.1 using gcc 2.96
- References: <2B721C6525F0D411B1E900B0D0226BDD044C73E1@mohmsg01.ad.infosys.com>
Hi Jyotirmoy,
I do not know if that list is comprehensively sufficient for Red Hat Linux
Advanced Server 2.1. (I use RHLAS 2.1, but not for a multithreaded
application.)
I presume you are including the correct flag for multithreading. That
would be "gcc -pthread" for compile and link (which puts in -D_REENTRANT
and -lpthread, respectively). Da? Nyet?
And I presume your GCC was built with --enable-threads=posix (which you can
see via "gcc -v" for GCC 3.2, but I presume you'll have to infer during
compilation if you use RH/GCC 2.96).
In C and C++, multithreading is wishy-washy. It's not part of the
language, it's a "bolt-on" that varies by vendor. And not all vendors or
platforms support POSIX (or necessarily support POSIX correctly).
For C++, I believe the BOOST folks have a platform-neutral thread
API. Assuming you were using C++, it's probably a little late in the game
to switch horses to a different thread paradigm (say, BOOST versus POSIX or
versus platform-centric).
HTH,
--Eljay