Skip to contentSkip to conversation

simple task_prio() fix

PATCH New Robert Love 1 participant 1 message Mar 7, 2003

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 simple task_prio() fix

Linus, while we are on the subject of the scheduler...

Trivial fix for task_prio() in the case MAX_RT_PRIO != MAX_USER_RT_PRIO where all priorities are skewed by (MAX_RT_PRIO - MAX_USER_RT_PRIO). The fix makes sense, as the full priority range is unrelated to the maximum user value. Only the real maximum RT value matters.

The object code is the same for the 99% of the people who do not touch the real-time priority defines.

Patch is against current BK - please, apply.

Robert Love

 kernel/sched.c |    2 +-
 1 files changed, 1 insertion(+), 1 deletion(-)
kernel/sched.c +1 -1
diff -urN linux-2.5.64-bk/kernel/sched.c linux/kernel/sched.c
@@ -1629,7 +1629,7 @@
  */
 int task_prio(task_t *p)
 {
-	return p->prio - MAX_USER_RT_PRIO;
+	return p->prio - MAX_RT_PRIO;
 }
 
 /**