函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:kernel\exit.c Create Date:2022-07-27 10:03:16
Last Modify:2020-03-17 11:17:32 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称:Consider @p for a wait by @parent

函数原型:static int wait_consider_task(struct wait_opts *wo, int ptrace, struct task_struct *p)

返回类型:int

参数:

类型参数名称
struct wait_opts *wo
intptrace
struct task_struct *p
1265  exit_state等于READ_ONCE(进程退出时状态)
1268  如果此条件成立可能性小(为编译器优化)(exit_state == Used in tsk->exit_state: )则返回:0
1271  ret等于eligible_child(wo, ptrace, p)
1272  如果非ret则返回:ret
1275  如果此条件成立可能性小(为编译器优化)(exit_state == EXIT_TRACE)则
1280  如果此条件成立可能性大(为编译器优化)(!ptrace)则notask_error等于0
1282  返回:0
1285  如果此条件成立可能性大(为编译器优化)(!ptrace)且此条件成立可能性小(为编译器优化)(ptrace)则
1297  如果非ptrace_reparented(p)则ptrace等于1
1302  如果exit_state恒等于EXIT_ZOMBIE
1304  如果非delay_group_leader(p)则
1334  如果此条件成立可能性大(为编译器优化)(!ptrace)或wo_flags按位与WCONTINUED按位或WEXITED的值则notask_error等于0
1336  否则
1341  notask_error等于0
1348  ret等于wait_task_stopped - Wait for %TASK_STOPPED or %TASK_TRACED*@wo: wait options*@ptrace: is the wait for ptrace*@p: task to wait for* Handle sys_wait4() work for %p in state %TASK_STOPPED or %TASK_TRACED
1349  如果ret则返回:ret
1357  返回:Handle do_wait work for one task in a live, non-stopped state.* read_lock(&tasklist_lock) on entry. If we return zero, we still hold* the lock and this task is uninteresting. If we return nonzero, we have
调用者
名称描述
do_wait_threadDo the work of do_wait() for one thread in the group, @tsk
ptrace_do_wait