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:
parent
f53e1c9383
commit
e5ba465043
@ -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:
|
||||
|
@ -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:
|
||||
|
Loading…
Reference in New Issue
Block a user