函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:设置下一次触发时间

函数原型:int clockevents_program_event(struct clock_event_device *dev, ktime_t expires, bool force)

返回类型:int

参数:

类型参数名称
struct clock_event_device *dev
ktime_texpires
boolforce
310  如果WARN_ON_ONCE(expires < 0)则返回:负ETIME
313  next_event等于expires
315  如果clockevent_state_shutdown(dev)则返回:0
319  WARN_ONCE(!clockevent_state_oneshot(dev), "Current state: %d\n", clockevent_get_state(dev))
323  如果features按位与CLOCK_EVT_FEAT_KTIME则返回:set_next_ktime(expires, dev)
326  delta等于Convert ktime_t to nanoseconds
327  如果delta小于等于0则返回:如果forcelockevents_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.否则负ETIME
330  delta等于两数取小(delta, (int64_t)max_delta_ns)
331  delta等于两数取大(delta, (int64_t)min_delta_ns)
333  clc等于deltamult右移shift
334  rc等于set_next_event((unsignedlong)clc, dev)
336  返回:如果rcforcelockevents_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.否则rc
调用者
名称描述
__clockevents_update_freq
tick_handle_periodic时钟中断函数
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)