提交 01783e0d 编写于 作者: G Geliang Tang 提交者: 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: NGeliang Tang <geliangtang@163.com>
Signed-off-by: NPeter 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: NIngo Molnar <mingo@kernel.org>
上级 3ea94de1
......@@ -731,7 +731,7 @@ bool sched_can_stop_tick(void)
if (current->policy == SCHED_RR) {
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% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册