Commit 01783e0d authored by Geliang Tang's avatar Geliang Tang Committed by Ingo Molnar

sched/core: Use list_is_singular() in sched_can_stop_tick()

Use list_is_singular() to check if run_list has only one entry.
Signed-off-by: default avatarGeliang Tang <geliangtang@163.com>
Signed-off-by: default avatarPeter Zijlstra (Intel) <peterz@infradead.org>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Mike Galbraith <efault@gmx.de>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Link: http://lkml.kernel.org/r/a5453fafd735affcf28e53a1d0a3d6965cb5dbb5.1447582547.git.geliangtang@163.comSigned-off-by: default avatarIngo Molnar <mingo@kernel.org>
parent 3ea94de1
...@@ -731,7 +731,7 @@ bool sched_can_stop_tick(void) ...@@ -731,7 +731,7 @@ bool sched_can_stop_tick(void)
if (current->policy == SCHED_RR) { if (current->policy == SCHED_RR) {
struct sched_rt_entity *rt_se = &current->rt; struct sched_rt_entity *rt_se = &current->rt;
return rt_se->run_list.prev == rt_se->run_list.next; return list_is_singular(&rt_se->run_list);
} }
/* /*
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment