函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:kernel\time\hrtimer.c Create Date:2022-07-27 11:41:05
Last Modify:2020-03-12 14:18:49 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称:schedule_hrtimeout_range_clock - sleep until timeout*@expires: timeout value (ktime_t)*@delta: slack in expires timeout (ktime_t)*@mode: timer mode*@clock_id: timer clock to be used

函数原型:int __sched schedule_hrtimeout_range_clock(ktime_t *expires, u64 delta, const enum hrtimer_mode mode, clockid_t clock_id)

返回类型:int

参数:

类型参数名称
ktime_t *expires
u64delta
const enum hrtimer_modemode
clockid_tclock_id
2112  如果expiresexpires恒等于0则
2113  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;* (就绪态)
2114  返回:0
2120  如果非expires
2121  进程调度
2122  返回:负EINTR
2125  hrtimer_init_sleeper_on_stack( & t, clock_id, mode)
2126  hrtimer_set_expires_range_ns( & timer, * expires, delta)
2127  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
2129  如果此条件成立可能性大(为编译器优化)(task)则进程调度
2132  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
2133  destroy_hrtimer_on_stack( & timer)
2135  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;* (就绪态)
2137  返回:如果非task则0否则负EINTR
调用者
名称描述
schedule_hrtimeout_rangeschedule_hrtimeout_range - sleep until timeout*@expires: timeout value (ktime_t)*@delta: slack in expires timeout (ktime_t)*@mode: timer mode* Make the current task sleep until the given expiry time has* elapsed. The routine will return immediately unless
wq_sleepPuts current task to sleep. Caller must hold queue lock. After return* lock isn't held.