gcc single threaded? - HP UX

This is a discussion on gcc single threaded? - HP UX ; When installing the gcc 4.1.1 package made available by HP it is configured as "thread model: single". Can anyone tell me what that means in detail? How does that affect multithreaded code or is this only a restriction on how ...

+ Reply to Thread
Results 1 to 2 of 2

Thread: gcc single threaded?

  1. gcc single threaded?

    When installing the gcc 4.1.1 package made available by HP it is configured
    as "thread model: single". Can anyone tell me what that means in detail? How
    does that affect multithreaded code or is this only a restriction on how gcc
    works (the compiler itself)?

    Thanks in advance.

    -- Henrik



  2. Re: gcc single threaded?

    In article <44a97267$0$13988$edfadb0f@dread15.news.tele.dk>,
    Henrik Goldman wrote:
    >When installing the gcc 4.1.1 package made available by HP it is configured
    >as "thread model: single". Can anyone tell me what that means in detail? How
    >does that affect multithreaded code or is this only a restriction on how gcc
    >works (the compiler itself)?
    >
    >Thanks in advance.
    >
    >-- Henrik


    The thread model doesn't do much, if anything, to the compiler itself.
    It may affect the C++ standard library in that the library will not use
    any synchronization to keep classes defined there thread safe. You can
    still use the '-pthread' option with GCC to automatically define
    -D_REENTRANT -D_THREAD_SAFE -D_POSIX_C_SOURCE=199506L on compilations
    (on HP-UX 11.* OS releases) and to link in the system pthread library.

    The defines that get set on other older HP-UX OS's may be different.

    Steve Ellcey
    sje cup . hp . com

+ Reply to Thread