Re: linux-next 20111025: warnings inrcu_idle_exit_common()/rcu_idle_enter_common()

From: Peter Zijlstra
Date: Thu Nov 10 2011 - 13:33:38 EST


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.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/