Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name: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.

Proto:u64 hrtimer_forward(struct hrtimer *timer, ktime_t now, ktime_t interval)

Type:u64

Parameter:

TypeParameterName
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  If delta < 0 Then Return 0
928  If WARN_ON(state & HRTIMER_STATE_ENQUEUED) Then Return 0
931  If interval < hrtimer_resolution Then interval = hrtimer_resolution
934  If Value for the false possibility is greater at compile time(delta >= interval) Then
935  incr = Convert ktime_t to nanoseconds
937  orun = ktime_divns(delta, incr)
938  hrtimer_add_expires_ns(timer, incr * orun)
939  If hrtimer_get_expires_tv64(timer) > now Then Return orun
945  orun++
947  hrtimer_add_expires(timer, interval)
949  Return orun
Caller
NameDescribe
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