函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称: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

函数原型:static int do_sigtimedwait(const sigset_t *which, kernel_siginfo_t *info, const struct timespec64 *ts)

返回类型:int

参数:

类型参数名称
const sigset_t *which
kernel_siginfo_t *info
const struct timespec64 *ts
3435  to等于NULL, timeout等于KTIME_MAX
3436  tsk等于当前进程
3437  mask等于which
3438  ret等于0
3440  如果ts
3441  如果非Returns true if the timespec64 is norm, false if denorm:则返回:负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  如果非sigtimeout
3462  real_blocked等于需要阻塞的信号
3463  sigandsets( & 需要阻塞的信号, & 需要阻塞的信号, & mask)
3464  确定进程等待信号
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;* (睡眠态)
3468  ret等于freezable_schedule_hrtimeout_range(to, 空闲时间, 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  如果sig则返回:sig
3479  返回:如果ret则负EINTR否则负EAGAIN
调用者
名称描述
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