Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:kernel\signal.c Create Date:2022-07-28 09:15:17
Last Modify:2020-03-17 13:28:47 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name: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

Proto:static struct sigqueue *__sigqueue_alloc(int sig, struct task_struct *t, gfp_t flags, int override_rlimit)

Type:struct sigqueue

Parameter:

TypeParameterName
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  If override_rlimit || atomic_read( & How many pending signals does this user have? ) <= task_rlimit(t, RLIMIT_SIGPENDING) Then
429  q = kmem_cache_alloc(SLAB caches for signal bits., flags)
430  Else
431  print_dropped_signal(sig)
434  If Value for the false possibility is greater at compile time(q == NULL) Then
435  atomic_dec( & How many pending signals does this user have? )
436  free_uid(user)
437  Else
438  Initialization list head
439  flags = 0
440  user = user
443  Return q
Caller
NameDescribe
__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"