diff options
author | rpj <rpj> | 2005-05-26 08:15:53 +0000 |
---|---|---|
committer | rpj <rpj> | 2005-05-26 08:15:53 +0000 |
commit | 58de21f1e7cde4c32bfd03b545ac3ede6b6a8e38 (patch) | |
tree | 395a821800af83ce199eca4cddf30f015ab68042 /pthread.h | |
parent | 610c2958a3bedd909ccab7971d1e67f6671512a1 (diff) |
''
Diffstat (limited to 'pthread.h')
-rw-r--r-- | pthread.h | 39 |
1 files changed, 4 insertions, 35 deletions
@@ -191,15 +191,6 @@ /* Try to avoid including windows.h */ #if defined(__MINGW32__) && defined(__cplusplus) -/* - * FIXME: The pthreadGCE.dll build gets linker unresolved errors - * on pthread_key_create() unless windows.h is included here. - * It appears to have something to do with an argument type mismatch. - * Looking at tsd.o with 'nm' shows this line: - * 00000000 T _pthread_key_create__FPP14pthread_key_t_PFPv_v - * instead of - * 00000000 T _pthread_key_create - */ #define PTW32_INCLUDE_WINDOWS_H #endif @@ -223,26 +214,6 @@ typedef unsigned long DWORD_PTR; #include "config.h" #endif /* HAVE_CONFIG_H */ -#if PTW32_LEVEL >= PTW32_LEVEL_MAX - -/* Try to avoid including windows.h */ -#if defined(__MINGW32__) && defined(__cplusplus) -/* - * FIXME: The pthreadGCE.dll build gets linker unresolved errors - * on pthread_key_create() unless windows.h is included here. - * It appears to have something to do with an argument type mismatch. - * Looking at tsd.o with 'nm' shows this line: - * 00000000 T _pthread_key_create__FPP14pthread_key_t_PFPv_v - * instead of - * 00000000 T _pthread_key_create - */ -#define PTW32_INCLUDE_WINDOWS_H -#endif - -#ifdef PTW32_INCLUDE_WINDOWS_H -#include <windows.h> -#endif - #ifndef NEED_FTIME #include <time.h> #else /* NEED_FTIME */ @@ -332,8 +303,6 @@ enum { #endif #endif -#endif /* PTW32_LEVEL >= PTW32_LEVEL_MAX */ - #ifndef HAVE_STRUCT_TIMESPEC #define HAVE_STRUCT_TIMESPEC 1 struct timespec { @@ -684,14 +653,14 @@ enum { * ==================== * ==================== */ -#define PTHREAD_ONCE_INIT { 0, PTW32_FALSE, 0, 0} +#define PTHREAD_ONCE_INIT { PTW32_FALSE, PTW32_FALSE, 0, 0} struct pthread_once_t_ { - int state; /* indicates if user function has been executed, or cancelled */ + int done; /* indicates if user function has been executed */ int started; - int eventUsers; - HANDLE event; + int numSemaphoreUsers; + HANDLE semaphore; }; |