Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:lockevents_program_event - Reprogram the clock event device.*@dev: device to program*@expires: absolute expiry time (monotonic clock)*@force: program minimum delay if expires can not be set* Returns 0 on success, -ETIME when the event is in the past.

Proto:int clockevents_program_event(struct clock_event_device *dev, ktime_t expires, bool force)

Type:int

Parameter:

TypeParameterName
struct clock_event_device *dev
ktime_texpires
boolforce
310  If WARN_ON_ONCE(expires < 0) Then Return -ETIME
313  next_event = expires
315  If clockevent_state_shutdown(dev) Then Return 0
319  WARN_ONCE(!clockevent_state_oneshot(dev), "Current state: %d\n", clockevent_get_state(dev))
323  If features & CLOCK_EVT_FEAT_KTIME Then Return set_next_ktime(expires, dev)
326  delta = Convert ktime_t to nanoseconds
327  If delta <= 0 Then Return If force Then lockevents_program_min_delta - Set clock event device to the minimum delay.*@dev: device to program* Returns 0 on success, -ETIME when the retry loop failed. Else -ETIME
330  delta = min - return minimum of two values of the same or compatible types*@x: first value*@y: second value(delta, (int64_t)max_delta_ns)
331  delta = max - return maximum of two values of the same or compatible types*@x: first value*@y: second value(delta, (int64_t)min_delta_ns)
333  clc = delta * mult >> shift
334  rc = set_next_event((unsignedlong)clc, dev)
336  Return If rc && force Then lockevents_program_min_delta - Set clock event device to the minimum delay.*@dev: device to program* Returns 0 on success, -ETIME when the retry loop failed. Else rc
Caller
NameDescribe
__clockevents_update_freq
tick_handle_periodicEvent handler for periodic ticks
tick_setup_periodicSetup the device for a periodic tick
tick_handle_periodic_broadcastEvent handler for periodic broadcast ticks
tick_program_eventk_program_event
tick_resume_oneshotk_resume_onshot - resume oneshot mode
tick_setup_oneshotk_setup_oneshot - setup the event device for oneshot mode (hres or nohz)