/* -ECHILD should be in ->notask_error before the first call. Returns nonzero for a final return, when we have unlocked tasklist_lock. Returns zero if the search for a child should continue; then ->notask_error is 0 if there were any eligible children, or another error from security_task_wait(), or still -ECHILD.  */
static int do_wait_thread(struct wait_opts *wo, struct task_struct *tsk)
/* -ECHILD should be in ->notask_error before the first call. Returns nonzero for a final return, when we have unlocked tasklist_lock. Returns zero if the search for a child should continue; then ->notask_error is 0 if there were any eligible children, or another error from security_task_wait(), or still -ECHILD.  */
static int do_wait_thread(struct wait_opts *wo, struct task_struct *tsk)
{
	struct task_struct *p;
	list_for_each_entry(p, &tsk->children, sibling) {
		int ret = wait_consider_task(wo, 0, p);
		if (ret)
			return ret;
	}
	return 0;
}