函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:kill_something_info() interprets pid in interesting ways just like kill(2).* POSIX specifies that kill(-1,sig) is unspecified, but what we have* is probably wrong. Should make it like BSD or SYSV.

函数原型:static int kill_something_info(int sig, struct kernel_siginfo *info, pid_t pid)

返回类型:int

参数:

类型参数名称
intsig
struct kernel_siginfo *info
pid_tpid
1555  如果pid大于0则
1556  _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
1557  ret等于kill_pid_info(sig, info, find_vpid(pid))
1558  _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()
1559  返回:ret
1563  如果pid恒等于INT_MIN则返回:负ESRCH
1566  read_lock( & tasklist_lock)
1567  如果pid不等于负1则
1568  ret等于__kill_pgrp_info() sends a signal to a process group: this is what the tty* control characters do (^C, ^Z etc)* - the caller must hold at least a readlock on tasklist_lock
1570  否则
1571  retval等于0, count等于0
1575  如果task_pid_vnr(p)大于1且非same_thread_group(p, 当前进程)则
1579  count先自加
1580  如果err不等于负EPERMretval等于err
1584  ret等于如果countretval否则负ESRCH
1586  read_unlock( & tasklist_lock)
1588  返回:ret
调用者
名称描述
SYSCALL_DEFINE2sys_kill - send a signal to a process*@pid: the PID of the process*@sig: signal to be sent