函数源码

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source File:kernel\exit.c Create Date:2022-07-27 10:03:17
首页 Copyright©Brick

1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
/*
 * Do the work of do_wait() for one thread in the group, @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 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;
}