函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:This function expects the tasklist_lock write-locked.

函数原型:static void __exit_signal(struct task_struct *tsk)

返回类型:void

参数:

类型参数名称
struct task_struct *tsk
94  sig等于信号
95  group_dead等于thread_group_leader(tsk)
97  tty等于tty
100  sighand等于cu_dereference_check() - rcu_dereference with debug checking*@p: The pointer to read, prior to dereferencing*@c: The conditions under which the dereference will take place* Do an rcu_dereference(), but check that the conditions under which the(sighand, lockdep_tasklist_lock_is_held())
102  加自旋锁
119  如果group_dead
120  tty等于NULL if no tty
121  NULL if no tty = NULL
122  否则
127  如果verloaded:* - notify group_exit_task when ->count is equal to notify_count* - everyone except group_exit_task is stopped during signal delivery* of fatal signals, group_exit_task processes the signal.大于0且非verloaded:* - notify group_exit_task when ->count is equal to notify_count* - everyone except group_exit_task is stopped during signal delivery* of fatal signals, group_exit_task processes the signal.先自减则唤醒中断线程
130  如果tsk恒等于current thread group signal load-balancing target: current thread group signal load-balancing target: 等于next_thread(tsk)
134  add_device_randomness((constvoid * ) & sum_exec_runtime, sizeof(unsignedlonglong))
143  task_cputime(tsk, & utime, & stime)
144  当前CPU负责更新时间
145  utime加等于utime
146  stime加等于stime
147  gtime加等于task_gtime(tsk)
148  min_flt加等于换页信息
149  maj_flt加等于换页信息
150  nvcsw加等于切换计数
151  nivcsw加等于上下文切换计数
152  inblock加等于task_io_get_inblock(tsk)
153  oublock加等于task_io_get_oublock(tsk)
154  task_io_accounting_add( & ioac, & ioac)
155  Cumulative ns of schedule CPU time fo dead threads in the* group, not including a zombie group leader, (This only differs* from jiffies_to_ns(utime + stime) if sched_clock uses something* other than jiffies.)加等于sum_exec_runtime
156  nr_threads自减
157  __unhash_process(tsk, group_dead)
158  write_sequnlock( & Cumulative resource counters for dead threads in the group,* and for reaped dead child processes forked by this group.* Live threads maintain their own counters and add to these* in __exit_signal, except for the group leader.)
164  flush_sigqueue( & 待处理信号)
165  sighand = NULL
166  自旋锁解锁
168  __cleanup_sighand(sighand)
169  清除线程指定标志
170  如果group_dead
171  flush_sigqueue( & shared signal handling: )
172  tty_kref_put(tty)
调用者
名称描述
release_task