diff options
| author | ko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-05-19 12:09:14 +0000 |
|---|---|---|
| committer | ko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-05-19 12:09:14 +0000 |
| commit | 2e5247d4e8b4e18521d8ed0253e3ce31ab5a6cd1 (patch) | |
| tree | 688c78e8fbf9b97d2e43f31c969ba27c3c3af6e0 /thread_pthread.c | |
| parent | 131f1321179768a28193fce18f661617870aac3f (diff) | |
| download | ruby-2e5247d4e8b4e18521d8ed0253e3ce31ab5a6cd1.tar.gz ruby-2e5247d4e8b4e18521d8ed0253e3ce31ab5a6cd1.tar.xz ruby-2e5247d4e8b4e18521d8ed0253e3ce31ab5a6cd1.zip | |
* thread_pthread.c (native_thread_apply_priority):
fix argument range check. [ruby-dev:33124]
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@16481 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
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 5ea391abd..58ce37884 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); |
