task_prio() fix
PATCH 1/1 task_prio() fix
Looks like task_prio() should do:
int task_prio(task_t *p)
{
return p->prio - MAX_RT_PRIO;
}Instead of subtracting MAX_USER_RT_PRIO, since the maximum _user_ value has nothing to do with the maximum that may be stored. The effect is if MAX_RT_PRIO != MAX_USER_RT_PRIO, then all priorities are skewed by (MAX_RT_PRIO - MAX_USER_RT_PRIO).
Ingo, this looks trivial to me... but I swear it _used_ to work and this function has always been like this. Comments?
Patch is against 2.5.62.
Robert Love
kernel/sched.c | 2 +- 1 files changed, 1 insertion(+), 1 deletion(-)
kernel/sched.c +1 -1
@@ -1552,7 +1552,7 @@*/ int task_prio (task_t *p) { -return p->prio -MAX_USER_RT_PRIO ; +return p->prio -MAX_RT_PRIO ; }/**