This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Solaris -pthreads specs ?
- To: gcc at gcc dot gnu dot org
- Subject: Re: Solaris -pthreads specs ?
- From: Brian Ford <ford at vss dot fsi dot com>
- Date: Mon, 25 Jun 2001 10:24:46 -0500 (CDT)
On Mon, 25 Jun 2001, Brian Ford wrote:
> I see in the specs file for gcc 2.95.2 and 3.0 that when given the
> -pthreads flag, -D_REENTRANT is defined. It is also defined when given
> the -threads flag for Solaris threads.
>
> According to my documentation in the Solaris AnswerBook, -D_REENTRANT
> means that Solaris threads semantics prevail over posix thread
> symantics. This seems like the wrong thing to do when given -pthreads.
>
> Would it not be better to define -D_POSIX_C_SOURCE=199506L like the
> AnswerBook suggests to have posix sematics prevail?
>
Sorry to follow up on my own post.
Maybe both -D_REENTRANT and -D_POSIX_PTHREAD_SEMANTICS is closer to what
we want as it allows mixed applications (both Solaris and POSIX threads)
with POSIX symantics prevailing.
--
Brian Ford
Software Engineer
Vital Visual Simulation Systems
FlightSafety International
Phone: 314-551-8460
Fax: 314-551-8444