函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:初始化系统时钟计时

函数原型:void __init timekeeping_init(void)

返回类型:void

参数:

1535  tk等于timekeeper
1539  ad_persistent_wall_and_boot_offset - Read persistent clock, and also offset* from the boot.* Weak dummy function for arches that do not yet support it.* The default function calculates offset based on the current value of* local_clock()
1540  如果timespec64_valid_settod( & wall_time)且64位timespec时间转换到纳秒大于0则
1542  Flag for if there is a persistent clock on this platform = true
1543  否则如果64位timespec时间转换到纳秒不等于0则
1544  打印警告信息("Persistent clock returned invalid value")
1545  wall_time = (struct timespec64){0}
1548  如果lhs < rhs: return <0* lhs == rhs: return 0* lhs > rhs: return >0小于0则boot_offset = (structtimespec64){0}
1555  wall_to_mono等于sub = lhs - rhs, in normalized form
1557  raw_spin_lock_irqsave( & timekeeper_lock, flags)
1558  write_seqcount_begin( & seq)
1559  ntp_init()
1561  clock等于clocksource_default_clock()
1562  如果enableenable(clock)
1564  k_setup_internals - Set up internals to use clocksource clock
1566  tk_set_xtime(tk, & wall_time)
1567  raw_sec等于0
1569  tk_set_wall_to_mono(tk, wall_to_mono)
1571  must hold timekeeper_lock
1573  write_seqcount_end( & seq)
1574  raw_spin_unlock_irqrestore( & timekeeper_lock, flags)
调用者
名称描述
start_kernel启动内核