On Wed, Dec 20, 2006 at 03:06:51PM +1100, Paul Mackerras wrote: > Akinobu Mita writes: > > > Use is_init() rather than hard coded pid comparison. > > What's the context of this patch? Why is this a good thing to do? >
This is just minor cleanup patch. is_init() is available on 2.6.20-rc1 (include/linux/sched.h): /** * is_init - check if a task structure is init * @tsk: Task structure to be checked. * * Check if a task structure is the first user space task the kernel created. */ static inline int is_init(struct task_struct *tsk) { return tsk->pid == 1; } - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/