Re: linux-next 20111025: warnings in rcu_idle_exit_common()/rcu_idle_enter_common()

Peter Zijlstra
2011-11-10T18:33:38Z

On Thu, 2011-11-10 at 09:20 -0800, Paul E. McKenney wrote:

> Should this be encapsulated, for example in an inline function something
> as follows?
>
> static inline void cpu_is_running_idle_task(struct task_struct *tsk)
> {
> return tsk->pid == 0;
> }
>
> I am sure I could come up with a longer name, if you would prefer. ;-)

:-)

> I would be happy to create the patch and fix up the other open-coded
> uses of ->pid==0 if this approach looks good to you.

is_idle_task(p) would work for me.