函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:allocate a new signal queue record* - this may be called without locks if and only if t == current, otherwise an* appropriate lock must be held to stop the target task from exiting

函数原型:static struct sigqueue *__sigqueue_alloc(int sig, struct task_struct *t, gfp_t flags, int override_rlimit)

返回类型:struct sigqueue

参数:

类型参数名称
intsig
struct task_struct *t
gfp_tflags
intoverride_rlimit
414  struct sigqueue * q = NULL
421  _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
422  user等于get_uid(user)
423  atomic_inc( & How many pending signals does this user have? )
424  _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()
426  如果override_rlimitatomic_read( & How many pending signals does this user have? )小于等于task_rlimit(t, RLIMIT_SIGPENDING)则
429  q等于kmem_cache_alloc(SLAB caches for signal bits., flags)
430  否则
431  print_dropped_signal(sig)
434  如果此条件成立可能性小(为编译器优化)(q == NULL)则
435  atomic_dec( & How many pending signals does this user have? )
436  free_uid(user)
437  否则
438  初始化链表头
439  flags等于0
440  user等于user
443  返回:q
调用者
名称描述
__send_signal
sigqueue_allocThese functions support sending signals using preallocated sigqueue* structures. This is needed "because realtime applications cannot* afford to lose notifications of asynchronous events, like timer* expirations or I/O completions"