函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:do_notify_parent_cldstop - notify parent of stopped/continued state change*@tsk: task reporting the state change*@for_ptracer: the notification is for ptracer*@why: CLD_{CONTINUED|STOPPED|TRAPPED} to report

函数原型:static void do_notify_parent_cldstop(struct task_struct *tsk, bool for_ptracer, int why)

返回类型:void

参数:

类型参数名称
struct task_struct *tsk
boolfor_ptracer
intwhy
2021  如果for_ptracer
2022  parent等于 Recipient of SIGCHLD, wait4() reports:
2023  否则
2024  tsk等于线程组主管
2025  parent等于真正的父进程
2028  clear_siginfo( & info)
2029  si_signo等于SIGCHLD
2030  si_errno等于0
2034  _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
2035  si_pid等于task_pid_nr_ns(tsk, task_active_pid_ns(parent))
2036  si_uid等于from_kuid_munged(task_cred_xxx(parent, user_ns), task_uid(tsk))
2037  _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()
2039  task_cputime(tsk, & utime, & stime)
2040  si_utime等于nsec_to_clock_t(utime)
2041  si_stime等于nsec_to_clock_t(stime)
2043  si_code等于why
2045  :why恒等于stopped child has continued
2046  si_status等于SIGCONT
2047  退出
2048  :why恒等于child has stopped
2049  si_status等于group_exit_code按位与0x7f
2050  退出
2051  :why恒等于raced child has trapped
2052  si_status等于进程退出时发出的标号按位与0x7f
2053  退出
2054  默认
2055  BUG()
2058  sighand等于sighand
2059  spin_lock_irqsave( & siglock, flags)
2060  如果sa_handler不等于gnore signal 且非sa_flags按位与SA_FLAGS values:* SA_ONSTACK indicates that a registered stack_t will be used.* SA_RESTART flag to get restarting signals (which were the default long ago)* SA_NOCLDSTOP flag to turn off SIGCHLD when children stop.的值则__group_send_sig_info(SIGCHLD, & info, parent)
2066  __wake_up_parent(tsk, parent)
2067  spin_unlock_irqrestore( & siglock, flags)
调用者
名称描述
ptrace_stopThis must be called with current->sighand->siglock held.* This should be the path for all ptrace stops.* We always set current->last_siginfo while stopped here.* That makes it a way to test a stopped process for
do_signal_stopdo_signal_stop - handle group stop for SIGSTOP and other stop signals*@signr: signr causing group stop if initiating* If %JOBCTL_STOP_PENDING is not set yet, initiate group stop with @signr* and participate in it
get_signal
exit_signals