* [Patch] sched: use TASK_NICE for task_struct
@ 2009-02-16 10:54 Américo Wang
2009-02-16 12:44 ` Ingo Molnar
0 siblings, 1 reply; 2+ messages in thread
From: Américo Wang @ 2009-02-16 10:54 UTC (permalink / raw)
To: LKML; +Cc: Ingo Molnar
#define TASK_NICE(p) PRIO_TO_NICE((p)->static_prio)
So it's better to use TASK_NICE here.
Signed-off-by: WANG Cong <wangcong@zeuux.org>
Cc: Ingo Molnar <mingo@elte.hu>
---
diff --git a/kernel/sched.c b/kernel/sched.c
index c1d0ed3..a996bcc 100644
--- a/kernel/sched.c
+++ b/kernel/sched.c
@@ -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)
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2009-02-16 12:45 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-02-16 10:54 [Patch] sched: use TASK_NICE for task_struct Américo Wang
2009-02-16 12:44 ` Ingo Molnar
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox