This is the mail archive of the
mailing list for the GCC project.
RE: Linux multithread option, pthread , D_REENTRANT
- From: lrtaylor at micron dot com
- To: <patelx01 at yahoo dot com>, <gcc-help at gcc dot gnu dot org>
- Date: Fri, 11 Jun 2004 14:22:13 -0600
- Subject: RE: Linux multithread option, pthread , D_REENTRANT
Use -pthread both at compile time and at link time. This will cause
_REENTRANT to be defined, so you don't need to add it yourself.
Just in case there's any confusion, this will only set up compile and
link time options for building a multithreaded program. This will not
make a non-thread program multi-threaded. You have to do that yourself
in the program, and then use the -pthread option when building.
From: email@example.com [mailto:firstname.lastname@example.org] On
Behalf Of sadf sadf
Sent: Friday, June 11, 2004 2:19 PM
Subject: Linux multithread option, pthread , D_REENTRANT
I want to build multithread option on Linux.
I am using gcc 3.2.x version.
I have found, I have to use -pthread option. Is it
correct option, to make my application multithreaded?
Do I have to use this option for compile time or/&
Do I have to use the "-D_REENTRANT" option, at
compiler time time?
Is there any other command line option should I add,
to make my application multithreaded?
Do you Yahoo!?
Friends. Fun. Try the all-new Yahoo! Messenger.