aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/threading.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/threading.c b/src/threading.c
index e6eb40e..5fcc39b 100644
--- a/src/threading.c
+++ b/src/threading.c
@@ -523,12 +523,13 @@ bool_t THREAD_WAIT_IMPL( THREAD_T *ref, double secs)
523 // 523 //
524 #include <errno.h> 524 #include <errno.h>
525 525
526# if defined(__MINGW32__) || defined(__MINGW64__) 526# if ((defined(__MINGW32__) || defined(__MINGW64__)) && pthread_attr_setschedpolicy == ENOTSUP)
527 // from the mingw-w64 team: 527 // from the mingw-w64 team:
528 // Well, we support pthread_setschedparam by which you can specify 528 // Well, we support pthread_setschedparam by which you can specify
529 // threading-policy. Nevertheless, yes we lack this function. In 529 // threading-policy. Nevertheless, yes we lack this function. In
530 // general its implementation is pretty much trivial, as on Win32 target 530 // general its implementation is pretty much trivial, as on Win32 target
531 // just SCHED_OTHER can be supported. 531 // just SCHED_OTHER can be supported.
532 #undef pthread_attr_setschedpolicy
532 static int pthread_attr_setschedpolicy( pthread_attr_t* attr, int policy) 533 static int pthread_attr_setschedpolicy( pthread_attr_t* attr, int policy)
533 { 534 {
534 if( policy != SCHED_OTHER) 535 if( policy != SCHED_OTHER)
@@ -539,7 +540,6 @@ bool_t THREAD_WAIT_IMPL( THREAD_T *ref, double secs)
539 } 540 }
540# endif // defined(__MINGW32__) || defined(__MINGW64__) 541# endif // defined(__MINGW32__) || defined(__MINGW64__)
541 542
542 //
543 static void _PT_FAIL( int rc, const char *name, const char *file, uint_t line ) { 543 static void _PT_FAIL( int rc, const char *name, const char *file, uint_t line ) {
544 const char *why= (rc==EINVAL) ? "EINVAL" : 544 const char *why= (rc==EINVAL) ? "EINVAL" :
545 (rc==EBUSY) ? "EBUSY" : 545 (rc==EBUSY) ? "EBUSY" :