sched: Introduce task_is_running()
Replace a bunch of 'p->state == TASK_RUNNING' with a new helper: task_is_running(p). Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org> Acked-by: Davidlohr Bueso <dave@stgolabs.net> Acked-by: Geert Uytterhoeven <geert@linux-m68k.org> Acked-by: Will Deacon <will@kernel.org> Link: https://lore.kernel.org/r/20210611082838.222401495@infradead.org
This commit is contained in:
parent
37aadc687a
commit
b03fbd4ff2
33 changed files with 40 additions and 41 deletions
|
|
@ -2768,7 +2768,7 @@ EXPORT_SYMBOL_GPL(rcu_bind_current_to_nocb);
|
|||
#ifdef CONFIG_SMP
|
||||
static char *show_rcu_should_be_on_cpu(struct task_struct *tsp)
|
||||
{
|
||||
return tsp && tsp->state == TASK_RUNNING && !tsp->on_cpu ? "!" : "";
|
||||
return tsp && task_is_running(tsp) && !tsp->on_cpu ? "!" : "";
|
||||
}
|
||||
#else // #ifdef CONFIG_SMP
|
||||
static char *show_rcu_should_be_on_cpu(struct task_struct *tsp)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue