函数逻辑报告 |
Source Code:kernel\exit.c |
Create Date:2022-07-27 10:03:08 |
| Last Modify:2020-03-17 11:17:32 | Copyright©Brick |
| 首页 | 函数Tree |
| 注解内核,赢得工具 | 下载SCCT | English |
函数名称:Handle sys_wait4 work for one task in state EXIT_ZOMBIE. We hold* 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
函数原型:static int wait_task_zombie(struct wait_opts *wo, struct task_struct *p)
返回类型:int
参数:
| 类型 | 参数 | 名称 |
|---|---|---|
| struct wait_opts * | wo | |
| struct task_struct * | p |
| 977 | pid等于task_pid_vnr(p) |
| 978 | uid等于from_kuid_munged(current_user_ns(), task_uid(p)) |
| 981 | 如果非此条件成立可能性大(为编译器优化)(wo_flags & WEXITED)则返回:0 |
| 985 | status等于进程退出时发出的标号 |
| 986 | get_task_struct(p) |
| 987 | read_unlock( & tasklist_lock) |
| 988 | sched_annotate_sleep() |
| 989 | 如果wo_rusage则getrusage(p, sys_wait4() uses this , wo_rusage) |
| 991 | put_task_struct(p) |
| 992 | 转到:out_info |
| 999 | 如果cmpxchg( & 进程退出时状态, EXIT_ZOMBIE, state)不等于EXIT_ZOMBIE则返回:0 |
| 1004 | read_unlock( & tasklist_lock) |
| 1005 | sched_annotate_sleep() |
| 1010 | 如果state恒等于Used in tsk->exit_state: 且thread_group_leader(p)则 |
| 1036 | thread_group_cputime_adjusted(p, & tgutime, & tgstime) |
| 1037 | spin_lock_irq( & siglock) |
| 1038 | 当前CPU负责更新时间 |
| 1041 | cgtime加等于task_gtime(p)加gtime加cgtime |
| 1050 | cinblock加等于task_io_get_inblock(p)加inblock加cinblock |
| 1053 | coublock加等于task_io_get_oublock(p)加oublock加coublock |
| 1059 | task_io_accounting_add( & ioac, & ioac) |
| 1060 | task_io_accounting_add( & ioac, & ioac) |
| 1062 | spin_unlock_irq( & siglock) |
| 1065 | 如果wo_rusage则getrusage(p, sys_wait4() uses this , wo_rusage) |
| 1067 | status等于如果任务标志按位与group exit in progress 则group_exit_code否则进程退出时发出的标号 |
| 1071 | 如果state恒等于EXIT_TRACE则 |
| 1072 | write_lock_irq( & tasklist_lock) |
| 1074 | ptrace_unlink(p) |
| 1077 | state等于EXIT_ZOMBIE |
| 1078 | 如果do_notify_parent(p, 进程退出时发出的信号)则state等于Used in tsk->exit_state: |
| 1081 | write_unlock_irq( & tasklist_lock) |
| 1083 | 如果state恒等于Used in tsk->exit_state: 则release_task(p) |
| 1086 | out_info : |
| 1088 | 如果infop则 |
| 1089 | 如果status按位与0x7f的值恒等于0则 |
| 1090 | cause等于child has exited |
| 1092 | 否则 |
| 1093 | cause等于如果status按位与0x80则child terminated abnormally 否则child was killed |
| 1100 | 返回:pid |
| 名称 | 描述 |
|---|---|
| wait_consider_task | Consider @p for a wait by @parent |
| 源代码转换工具 开放的插件接口 | X |
|---|---|
| 支持:c/c++/esqlc/java Oracle/Informix/Mysql 插件可实现:逻辑报告 代码生成和批量转换代码 |