diff options
Diffstat (limited to 'src/threading.c')
-rw-r--r-- | src/threading.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/threading.c b/src/threading.c index 5a3e64b..3e181ba 100644 --- a/src/threading.c +++ b/src/threading.c | |||
@@ -248,7 +248,7 @@ static void prepare_timeout( struct timespec *ts, time_d abs_secs ) { | |||
248 | 248 | ||
249 | #if THREADAPI == THREADAPI_WINDOWS | 249 | #if THREADAPI == THREADAPI_WINDOWS |
250 | 250 | ||
251 | #if WINVER <= 0x0400 // Windows NT4: Use Mutexes with Events | 251 | #if _WIN32_WINNT < 0x0600 // CONDITION_VARIABLE aren't available |
252 | // | 252 | // |
253 | void MUTEX_INIT( MUTEX_T *ref ) { | 253 | void MUTEX_INIT( MUTEX_T *ref ) { |
254 | *ref= CreateMutex( NULL /*security attr*/, FALSE /*not locked*/, NULL ); | 254 | *ref= CreateMutex( NULL /*security attr*/, FALSE /*not locked*/, NULL ); |
@@ -270,7 +270,7 @@ static void prepare_timeout( struct timespec *ts, time_d abs_secs ) { | |||
270 | if (!ReleaseMutex(*ref)) | 270 | if (!ReleaseMutex(*ref)) |
271 | FAIL( "ReleaseMutex", GetLastError() ); | 271 | FAIL( "ReleaseMutex", GetLastError() ); |
272 | } | 272 | } |
273 | #endif // Windows NT4 | 273 | #endif // CONDITION_VARIABLE aren't available |
274 | 274 | ||
275 | static int const gs_prio_remap[] = | 275 | static int const gs_prio_remap[] = |
276 | { | 276 | { |
@@ -384,7 +384,7 @@ bool_t THREAD_WAIT_IMPL( THREAD_T *ref, double secs) | |||
384 | #endif // !__GNUC__ | 384 | #endif // !__GNUC__ |
385 | } | 385 | } |
386 | 386 | ||
387 | #if WINVER <= 0x0400 // Windows NT4 | 387 | #if _WIN32_WINNT < 0x0600 // CONDITION_VARIABLE aren't available |
388 | 388 | ||
389 | void SIGNAL_INIT( SIGNAL_T* ref) | 389 | void SIGNAL_INIT( SIGNAL_T* ref) |
390 | { | 390 | { |
@@ -477,7 +477,7 @@ bool_t THREAD_WAIT_IMPL( THREAD_T *ref, double secs) | |||
477 | FAIL( "WaitForSingleObject", GetLastError()); | 477 | FAIL( "WaitForSingleObject", GetLastError()); |
478 | } | 478 | } |
479 | 479 | ||
480 | #else // Windows Vista and above: condition variables exist, use them | 480 | #else // CONDITION_VARIABLE are available, use them |
481 | 481 | ||
482 | // | 482 | // |
483 | void SIGNAL_INIT( SIGNAL_T *ref ) | 483 | void SIGNAL_INIT( SIGNAL_T *ref ) |
@@ -534,7 +534,7 @@ bool_t THREAD_WAIT_IMPL( THREAD_T *ref, double secs) | |||
534 | WakeAllConditionVariable( ref); | 534 | WakeAllConditionVariable( ref); |
535 | } | 535 | } |
536 | 536 | ||
537 | #endif // Windows Vista and above | 537 | #endif // CONDITION_VARIABLE are available |
538 | 538 | ||
539 | #else // THREADAPI == THREADAPI_PTHREAD | 539 | #else // THREADAPI == THREADAPI_PTHREAD |
540 | // PThread (Linux, OS X, ...) | 540 | // PThread (Linux, OS X, ...) |