CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 6 of 6
  1. #1
    George2 is offline Elite Member Power Poster
    Join Date
    Oct 2002
    Posts
    4,468

    Unhappy A question about the precompiler directive __PTHREADS__

    Hi, everyone!

    Where is the the precompiler directive __PTHREADS__ defined?
    Defined in compiler? What is the meaning and function of
    the precompiler directive __PTHREADS__?

    Thanks in advance,
    George

  2. #2
    Join Date
    May 2000
    Location
    Phoenix, AZ [USA]
    Posts
    1,347
    pthreads is a thread library on unix. Do a search through all
    header files you're #include'ing to see where it's #define'd [like
    I've told you in two other posts].

  3. #3
    George2 is offline Elite Member Power Poster
    Join Date
    Oct 2002
    Posts
    4,468
    Thanks PaulWendt pal!

    Does Windows use pthreads library?
    If I am using Windows version of the project, can
    I passby the codes has something to do with pthreads?

    Cheers,
    Geroge

  4. #4
    Join Date
    May 2000
    Location
    Phoenix, AZ [USA]
    Posts
    1,347
    I am pretty sure that Microsoft hasn't implemented a pthread API
    as part of their C-runtime so you'll either need to modify the code
    or try to see if there is a version of pthreads for windows.
    There MAY be a version of pthreads that has been implemented
    on Windows; you'd have to do a search on the internet to see.
    Basically, pthreads will do the same thing as native WIN32 API
    threads ... but all of the function calls will be different.

  5. #5
    Join Date
    May 2000
    Location
    Phoenix, AZ [USA]
    Posts
    1,347
    I guess someone has ported pthreads to WIN32; I'd guess that
    it's just a wrapper around the WIN32 API. Here's a link:
    http://sources.redhat.com/pthreads-win32/

    --Paul

  6. #6
    George2 is offline Elite Member Power Poster
    Join Date
    Oct 2002
    Posts
    4,468
    Thanks!

    George

    Originally posted by PaulWendt
    I am pretty sure that Microsoft hasn't implemented a pthread API
    as part of their C-runtime so you'll either need to modify the code
    or try to see if there is a version of pthreads for windows.
    There MAY be a version of pthreads that has been implemented
    on Windows; you'd have to do a search on the internet to see.
    Basically, pthreads will do the same thing as native WIN32 API
    threads ... but all of the function calls will be different.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured