Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:kernel\time\hrtimer.c Create Date:2022-07-28 10:41:09
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:do_nanosleep

Proto:static int __sched do_nanosleep(struct hrtimer_sleeper *t, enum hrtimer_mode mode)

Type:int

Parameter:

TypeParameterName
struct hrtimer_sleeper *t
enum hrtimer_modemode
1869  Do
1870  set_current_state(TASK_INTERRUPTIBLE)
1871  hrtimer_sleeper_start_expires - Start a hrtimer sleeper timer*@sl: sleeper to be started*@mode: timer mode abs/rel* Wrapper around hrtimer_start_expires() for hrtimer_sleeper based timers* to allow PREEMPT_RT to tweak the delivery mode (soft/hardirq
1873  If Value is more likely to compile time(task) Then freezable_schedule()
1876  hrtimer_cancel - cancel a timer and wait for the handler to finish.*@timer: the timer to be cancelled* Returns:* 0 when the timer was not active* 1 when the timer was active
1877  mode = Time value is absolute
1879  When task && Not signal_pending(current process) cycle
1881  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;* (Used in tsk->state: )
1883  If Not task Then Return 0
1886  restart = restart_block
1887  If type != TT_NONE Then
1888  rem = hrtimer_expires_remaining( & timer)
1891  If rem <= 0 Then Return 0
1893  rmt = Map the ktime_t to timespec conversion to ns_to_timespec function (rem)
1895  Return nanosleep_copyout(restart, & rmt)
1897  Return -start by calling sys_restart_syscall
Caller
NameDescribe
hrtimer_nanosleep_restart
hrtimer_nanosleep