函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:hrtimer_forward - forward the timer expiry*@timer: hrtimer to forward*@now: forward past this time*@interval: the interval to forward* Forward the timer expiry so it will expire in the future.* Returns the number of overruns.

函数原型:u64 hrtimer_forward(struct hrtimer *timer, ktime_t now, ktime_t interval)

返回类型:u64

参数:

类型参数名称
struct hrtimer *timer
ktime_tnow
ktime_tinterval
920  orun等于1
923  delta等于Subtract two ktime_t variables. rem = lhs -rhs: (now, hrtimer_get_expires(timer))
925  如果delta小于0则返回:0
928  如果WARN_ON(state & HRTIMER_STATE_ENQUEUED)则返回:0
931  如果interval小于hrtimer_resolutioninterval等于hrtimer_resolution
934  如果此条件成立可能性小(为编译器优化)(delta >= interval)则
935  incr等于Convert ktime_t to nanoseconds
937  orun等于ktime_divns(delta, incr)
938  hrtimer_add_expires_ns(timer, incr * orun)
939  如果hrtimer_get_expires_tv64(timer)大于now则返回:orun
945  orun自加
947  hrtimer_add_expires(timer, interval)
949  返回:orun
调用者
名称描述
common_hrtimer_rearm
posix_timer_fnThis function gets called when a POSIX.1b interval timer expires. It* is used as a callback from the kernel internal timer. The* run_timer_list code ALWAYS calls with interrupts on.* This code is for CLOCK_REALTIME* and CLOCK_MONOTONIC* timers.
common_hrtimer_forward
hrtimer_forward_nowhrtimer_forward_now - forward the timer expiry so it expires after now*@timer: hrtimer to forward*@interval: the interval to forward* Forward the timer expiry so it will expire after the current time* of the hrtimer clock base