Re: -pthread option

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 16 January 2011 08:50, ali hagigat wrote:
> Add support for multithreading using the POSIX threads library.  This
> option sets flags for both the preprocessor and linker.  It does not
> affect the thread safety of object code produced by the compiler or
> that of libraries supplied with it.
> --------------------------------------------------------------
> What is the meaning of thread safety? I wonder if anybody knows what
> flags are set and please write a simple example of a multi-thread
> code.

The flags are platform-specific.  For GNU/Linux it passes -D_REENTRANT
 to the preprocessor and -lpthread to the linker.

This list really isn't the place to learn what thread-safety means, or
to learn about multithreading in general.  There are lots of books and
online documentation covering it.



[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux