* Linux multithread option, pthread , D_REENTRANT
@ 2004-06-11 20:18 sadf sadf
0 siblings, 0 replies; 2+ messages in thread
From: sadf sadf @ 2004-06-11 20:18 UTC (permalink / raw)
To: gcc-help
Hi,
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/&
link time?
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?
Thank you,
Avin Patel
__________________________________
Do you Yahoo!?
Friends. Fun. Try the all-new Yahoo! Messenger.
http://messenger.yahoo.com/
^ permalink raw reply [flat|nested] 2+ messages in thread
* RE: Linux multithread option, pthread , D_REENTRANT
@ 2004-06-11 20:22 lrtaylor
0 siblings, 0 replies; 2+ messages in thread
From: lrtaylor @ 2004-06-11 20:22 UTC (permalink / raw)
To: patelx01, gcc-help
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.
Thanks,
Lyle
-----Original Message-----
From: gcc-help-owner@gcc.gnu.org [mailto:gcc-help-owner@gcc.gnu.org] On
Behalf Of sadf sadf
Sent: Friday, June 11, 2004 2:19 PM
To: gcc-help@gcc.gnu.org
Subject: Linux multithread option, pthread , D_REENTRANT
Hi,
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/&
link time?
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?
Thank you,
Avin Patel
__________________________________
Do you Yahoo!?
Friends. Fun. Try the all-new Yahoo! Messenger.
http://messenger.yahoo.com/
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2004-06-11 20:22 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-06-11 20:18 Linux multithread option, pthread , D_REENTRANT sadf sadf
2004-06-11 20:22 lrtaylor
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).