函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:Send signals to all our closest relatives so that they know* to properly mourn us..

函数原型:static void exit_notify(struct task_struct *tsk, int group_dead)

返回类型:void

参数:

类型参数名称
struct task_struct *tsk
intgroup_dead
649  LIST_HEAD(dead)
651  write_lock_irq( & tasklist_lock)
652  This does two things:* A. Make init inherit all the child processes* B. Check to see if any process groups have become orphaned* as a result of our exiting, and if they have any stopped* jobs, send them a SIGHUP and then a SIGCONT. (POSIX 3.2.2.2)
654  如果group_deadCheck to see if any process groups have become orphaned as* a result of our exiting, and if they have any stopped jobs,* send them a SIGHUP and then a SIGCONT. (POSIX 3.2.2.2)
657  进程退出时状态等于EXIT_ZOMBIE
658  如果此条件成立可能性小(为编译器优化)(ptrace)则
659  sig等于如果thread_group_leader(tsk)且thread_group_empty(tsk)且非ptrace_reparented(tsk)则进程退出时发出的信号否则SIGCHLD
663  autoreap等于do_notify_parent(tsk, sig)
664  否则如果thread_group_leader(tsk)则
665  autoreap等于thread_group_empty(tsk)且do_notify_parent(tsk, 进程退出时发出的信号)
667  否则
668  autoreap = true
671  如果autoreap
672  进程退出时状态等于Used in tsk->exit_state:
673  添加链表项
677  如果此条件成立可能性小(为编译器优化)(notify_count < 0)则唤醒中断线程
679  write_unlock_irq( & tasklist_lock)
682  删除链表项并重新初始化
683  release_task(p)
调用者
名称描述
do_exit