On Mon, Dec 16, 2013 at 05:20:51PM -0500, Richard Guy Briggs wrote:
static inline bool is_idle_task(const struct task_struct *p)
{
- return p->pid == 0;
+ return task_pid(p) == &init_struct_pid;
}
I'll stick with task_pid_nr(p) == 0.
We're going to probably switch to:
return p->flags & PF_IDLE;
Soon, because people are playing silly tricks and want normal threads
to temporarily appear to be the idle thread (idle time injection).