diff options
Diffstat (limited to 'lib/libpthread/thread/thr_setschedparam.c')
-rw-r--r-- | lib/libpthread/thread/thr_setschedparam.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/libpthread/thread/thr_setschedparam.c b/lib/libpthread/thread/thr_setschedparam.c index bce965f..9a44ad7 100644 --- a/lib/libpthread/thread/thr_setschedparam.c +++ b/lib/libpthread/thread/thr_setschedparam.c @@ -59,7 +59,8 @@ pthread_setschedparam(pthread_t pthread, int policy, */ _thread_kern_sig_defer(); - if (param->sched_priority != pthread->base_priority) { + if (param->sched_priority != + PTHREAD_BASE_PRIORITY(pthread->base_priority)) { /* * Remove the thread from its current priority * queue before any adjustments are made to its @@ -72,6 +73,8 @@ pthread_setschedparam(pthread_t pthread, int policy, } /* Set the thread base priority: */ + pthread->base_priority &= + (PTHREAD_SIGNAL_PRIORITY | PTHREAD_RT_PRIORITY); pthread->base_priority = param->sched_priority; /* Recalculate the active priority: */ |