Skip to contentSkip to conversation

sched: use TASK_NICE for task_struct

PATCH Applied Américo Wang 2 participants 2 messages Feb 16, 2009

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 sched: use TASK_NICE for task_struct

#define TASK_NICE(p) PRIO_TO_NICE((p)->static_prio)

So it's better to use TASK_NICE here.

---

kernel/sched.c +1 -1
index c1d0ed3..a996bcc 100644
@@ -5145,7 +5145,7 @@ SYSCALL_DEFINE1(nice, int, increment)
 	if (increment > 40)
 		increment = 40;
 
-	nice = PRIO_TO_NICE(current->static_prio) + increment;
+	nice = TASK_NICE(current) + increment;
 	if (nice < -20)
 		nice = -20;
 	if (nice > 19)