Skip to content

Commit

Permalink
sched: use TASK_NICE for task_struct
Browse files Browse the repository at this point in the history
#define TASK_NICE(p)            PRIO_TO_NICE((p)->static_prio)

So it's better to use TASK_NICE here.

Signed-off-by: WANG Cong <[email protected]>
Acked-by: Peter Zijlstra <[email protected]>
Signed-off-by: Ingo Molnar <[email protected]>
  • Loading branch information
congwang authored and Ingo Molnar committed Feb 16, 2009
1 parent a0a522c commit 2b8f836
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion kernel/sched.c
Original file line number Diff line number Diff line change
Expand Up @@ -5236,7 +5236,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)
Expand Down

0 comments on commit 2b8f836

Please sign in to comment.