Click to See Complete Forum and Search --> : A question about the precompiler directive __PTHREADS__
George2
January 23rd, 2003, 07:04 AM
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
PaulWendt
January 23rd, 2003, 08:11 AM
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].
George2
January 23rd, 2003, 08:39 AM
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
PaulWendt
January 23rd, 2003, 09:48 AM
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.
PaulWendt
January 23rd, 2003, 09:51 AM
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
George2
January 23rd, 2003, 09:06 PM
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.
codeguru.com
Copyright Internet.com Inc., All Rights Reserved.