1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* thread_pthread.c (native_thread_apply_priority):

fix argument range check.  [ruby-dev:33124]



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16481 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
ko1 2008-05-19 12:09:14 +00:00
parent 3c95aacfcb
commit 67d0fbd03f
2 changed files with 9 additions and 4 deletions

View file

@ -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);