函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:release_task

函数原型:void release_task(struct task_struct *p)

返回类型:void

参数:

类型参数名称
struct task_struct *p
195  repeat :
198  _read_lock() - mark the beginning of an RCU read-side critical section* When synchronize_rcu() is invoked on one CPU while other CPUs* are within RCU read-side critical sections, then the* synchronize_rcu() is guaranteed to block until after all the other
199  atomic_dec( & processes)
200  _read_unlock() - marks the end of an RCU read-side critical section.* In most situations, rcu_read_unlock() is immune from deadlock.* However, in kernels built with CONFIG_RCU_BOOST, rcu_read_unlock()
202  proc_flush_task(p)
203  cgroup_release(p)
205  write_lock_irq( & tasklist_lock)
206  回收跟踪
207  This function expects the tasklist_lock write-locked.
214  zap_leader等于0
215  leader等于线程组主管
216  如果leader不等于pthread_group_empty(leader)且进程退出时状态恒等于EXIT_ZOMBIE
223  zap_leader等于do_notify_parent(leader, 进程退出时发出的信号)
224  如果zap_leader进程退出时状态等于Used in tsk->exit_state:
228  write_unlock_irq( & tasklist_lock)
229  release_thread(p)
230  put_task_struct_rcu_user(p)
232  p等于leader
233  如果此条件成立可能性小(为编译器优化)(zap_leader)则转到:repeat
调用者
名称描述
find_child_reaper
exit_notifySend signals to all our closest relatives so that they know* to properly mourn us..
wait_task_zombieHandle 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
de_threadThis function makes sure the current process has its own signal table,* so that flush_signal_handlers can later reset the handlers without* disturbing other processes. (Other processes might share the signal* table via the CLONE_SIGHAND option to clone().)