aboutsummaryrefslogtreecommitdiff
path: root/src/threading.h
diff options
context:
space:
mode:
authorBenoit Germain <b n t DOT g e r m a i n AT g m a i l DOT c o m>2013-07-20 09:25:39 +0200
committerBenoit Germain <b n t DOT g e r m a i n AT g m a i l DOT c o m>2013-07-20 09:25:39 +0200
commita2dc01d60e8b0fc32b98fe885068720492de1406 (patch)
treeefcec39656a9c9b3162e2881f38eb71d91df0302 /src/threading.h
parentd9cab463ac5d9539092fde03b22905f76f06844b (diff)
downloadlanes-a2dc01d60e8b0fc32b98fe885068720492de1406.tar.gz
lanes-a2dc01d60e8b0fc32b98fe885068720492de1406.tar.bz2
lanes-a2dc01d60e8b0fc32b98fe885068720492de1406.zip
Ditch PulseEvent usage on WIN32 builds
Diffstat (limited to '')
-rw-r--r--src/threading.h12
1 files changed, 10 insertions, 2 deletions
diff --git a/src/threading.h b/src/threading.h
index e559910..7d94f26 100644
--- a/src/threading.h
+++ b/src/threading.h
@@ -64,7 +64,7 @@ enum e_status { PENDING, RUNNING, WAITING, DONE, ERROR_ST, CANCELLED };
64 #else // !PLATFORM_XBOX 64 #else // !PLATFORM_XBOX
65 #define WIN32_LEAN_AND_MEAN 65 #define WIN32_LEAN_AND_MEAN
66 // 'SignalObjectAndWait' needs this (targets Windows 2000 and above) 66 // 'SignalObjectAndWait' needs this (targets Windows 2000 and above)
67 //#define _WIN32_WINNT 0x0500 Let the compiler decide depending on the host OS 67 #define _WIN32_WINNT 0x0400
68 #include <windows.h> 68 #include <windows.h>
69 #endif // !PLATFORM_XBOX 69 #endif // !PLATFORM_XBOX
70 #include <process.h> 70 #include <process.h>
@@ -76,8 +76,16 @@ enum e_status { PENDING, RUNNING, WAITING, DONE, ERROR_ST, CANCELLED };
76 // 76 //
77 77
78 #if WINVER <= 0x0400 // Windows NT4: use a signal 78 #if WINVER <= 0x0400 // Windows NT4: use a signal
79 typedef struct
80 {
81 CRITICAL_SECTION signalCS;
82 CRITICAL_SECTION countCS;
83 HANDLE waitEvent;
84 HANDLE waitDoneEvent;
85 LONG waitersCount;
86 } SIGNAL_T;
87
79 88
80 #define SIGNAL_T HANDLE
81 #define MUTEX_T HANDLE 89 #define MUTEX_T HANDLE
82 void MUTEX_INIT( MUTEX_T* ref); 90 void MUTEX_INIT( MUTEX_T* ref);
83 void MUTEX_FREE( MUTEX_T* ref); 91 void MUTEX_FREE( MUTEX_T* ref);