mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-16 08:44:21 +08:00
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 <wangcong@zeuux.org> Acked-by: Peter Zijlstra <peterz@infradead.org> Signed-off-by: Ingo Molnar <mingo@elte.hu>
This commit is contained in:
parent
a0a522ce3d
commit
2b8f836fb1
@ -5236,7 +5236,7 @@ SYSCALL_DEFINE1(nice, int, increment)
|
|||||||
if (increment > 40)
|
if (increment > 40)
|
||||||
increment = 40;
|
increment = 40;
|
||||||
|
|
||||||
nice = PRIO_TO_NICE(current->static_prio) + increment;
|
nice = TASK_NICE(current) + increment;
|
||||||
if (nice < -20)
|
if (nice < -20)
|
||||||
nice = -20;
|
nice = -20;
|
||||||
if (nice > 19)
|
if (nice > 19)
|
||||||
|
Loading…
Reference in New Issue
Block a user