diff options
Diffstat (limited to 'thread_pthread.c')
-rw-r--r-- | thread_pthread.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/thread_pthread.c b/thread_pthread.c index 5ea391abd4..58ce378841 100644 --- a/thread_pthread.c +++ b/thread_pthread.c @@ -358,12 +358,12 @@ native_thread_apply_priority(rb_thread_t *th) max = sched_get_priority_max(policy); min = sched_get_priority_min(policy); - if (min < priority) { - priority = max; - } - else if (max > priority) { + if (min > priority) { priority = min; } + else if (max < priority) { + priority = max; + } sp.sched_priority = priority; pthread_setschedparam(th->thread_id, policy, &sp); |