diff options
| author | Robert Love <rml@tech9.net> | 2003-04-20 23:24:30 -0700 |
|---|---|---|
| committer | Linus Torvalds <torvalds@home.transmeta.com> | 2003-04-20 23:24:30 -0700 |
| commit | 7957f703dbc8678d68e73d4b6d239675ed1de673 (patch) | |
| tree | 1c91066026ec351e5b95ee02f544befe2bda231a /kernel | |
| parent | 778c87e74f0fb7ebfa29dc2537c449079fa67723 (diff) | |
[PATCH] trivial task_prio() fix
Here is a trivial fix for task_prio() in the case MAX_RT_PRIO !=
MAX_USER_RT_PRIO. In this case, all priorities are skewed by
(MAX_RT_PRIO - MAX_USER_RT_PRIO).
The fix is to subtract the full MAX_RT_PRIO value from p->prio, not just
MAX_USER_RT_PRIO. This makes sense, as the full priority range is
unrelated to the maximum user value. Only the real maximum RT value
matters.
This has been in Andrew's tree for awhile, with no issue. Also, Ingo
acked it.
Diffstat (limited to 'kernel')
| -rw-r--r-- | kernel/sched.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/kernel/sched.c b/kernel/sched.c index ae2dbdf33d7d..97bbf5eddd5b 100644 --- a/kernel/sched.c +++ b/kernel/sched.c @@ -1666,7 +1666,7 @@ asmlinkage long sys_nice(int increment) */ int task_prio(task_t *p) { - return p->prio - MAX_USER_RT_PRIO; + return p->prio - MAX_RT_PRIO; } /** |
