Return priority range 0..PRI_MAX_TIMESHARE-PRI_MIN_TIMESHARE for

SCHED_OTHER, the same range as rtprio() is using. In old code,
it returns nice range -20 .. 20, nice should be treated as process
weight, it is really managed by getpriority() and setpriority()
syscalls, they are different.
This commit is contained in:
davidxu 2006-07-12 05:54:17 +00:00
parent f53e1c9383
commit e5ba465043
2 changed files with 4 additions and 4 deletions

View File

@ -270,7 +270,7 @@ ksched_get_priority_max(struct ksched *ksched, int policy, int *prio)
break;
case SCHED_OTHER:
*prio = PRIO_MAX;
*prio = PRI_MAX_TIMESHARE - PRI_MIN_TIMESHARE;
break;
default:
@ -293,7 +293,7 @@ ksched_get_priority_min(struct ksched *ksched, int policy, int *prio)
break;
case SCHED_OTHER:
*prio = PRIO_MIN;
*prio = 0;
break;
default:

View File

@ -270,7 +270,7 @@ ksched_get_priority_max(struct ksched *ksched, int policy, int *prio)
break;
case SCHED_OTHER:
*prio = PRIO_MAX;
*prio = PRI_MAX_TIMESHARE - PRI_MIN_TIMESHARE;
break;
default:
@ -293,7 +293,7 @@ ksched_get_priority_min(struct ksched *ksched, int policy, int *prio)
break;
case SCHED_OTHER:
*prio = PRIO_MIN;
*prio = 0;
break;
default: