sched: use TASK_NICE for task_struct
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.
Signed-off-by WANG Cong <[email protected]>
Cc Ingo Molnar <[email protected]>
---
kernel/sched.c +1 -1
@@ -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 )
Ingo Molnar
AppliedQuoted 6 lines · Américo Wang
#define
TASK_NICE(p)PRIO_TO_NICE((p)->static_prio)So it's better to use
TASK_NICEhere.Signed-off-by WANG Cong <[email protected]>Cc Ingo Molnar <[email protected]>
Applied to tip:sched/cleanups, thanks!
Ingo