Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:do_sigtimedwait - wait for queued signals specified in @which*@which: queued signals to wait for*@info: if non-null, the signal's siginfo is returned here*@ts: upper bound on process time suspension

Proto:static int do_sigtimedwait(const sigset_t *which, kernel_siginfo_t *info, const struct timespec64 *ts)

Type:int

Parameter:

TypeParameterName
const sigset_t *which
kernel_siginfo_t *info
const struct timespec64 *ts
3435  to = NULL , timeout = KTIME_MAX
3436  tsk = current process
3437  mask = which
3438  ret = 0
3440  If ts Then
3441  If Not Returns true if the timespec64 is norm, false if denorm: Then Return -EINVAL
3443  timeout = vert a timespec64 to ktime_t format:
3444  to = timeout
3450  sigdelsetmask( & mask, sigmask(SIGKILL) | sigmask(SIGSTOP))
3451  signotset( & mask)
3453  spin_lock_irq( & siglock)
3454  sig = Dequeue a signal and return the element to the caller, which is* expected to free it.* All callers have to hold the siglock.
3455  If Not sig && timeout Then
3462  real_blocked = blocked
3463  sigandsets( & blocked, & blocked, & mask)
3464  recalc_sigpending()
3465  spin_unlock_irq( & siglock)
3467  set_current_state() includes a barrier so that the write of current->state* is correctly serialised wrt the caller's subsequent test of whether to* actually sleep:* for (;;) {* set_current_state(TASK_UNINTERRUPTIBLE);* if (!need_sleep)* break;* (TASK_INTERRUPTIBLE)
3468  ret = freezable_schedule_hrtimeout_range(to, time slack values, HRTIMER_MODE_REL)
3470  spin_lock_irq( & siglock)
3471  __set_task_blocked(tsk, & real_blocked)
3472  sigemptyset( & real_blocked)
3473  sig = Dequeue a signal and return the element to the caller, which is* expected to free it.* All callers have to hold the siglock.
3475  spin_unlock_irq( & siglock)
3477  If sig Then Return sig
3479  Return If ret Then -EINTR Else -EAGAIN
Caller
NameDescribe
SYSCALL_DEFINE4sys_rt_sigtimedwait - synchronously wait for queued signals specified* in @uthese*@uthese: queued signals to wait for*@uinfo: if non-null, the signal's siginfo is returned here*@uts: upper bound on process time suspension*@sigsetsize: size of sigset_t type
COMPAT_SYSCALL_DEFINE4