函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:mekeeping_advance - Updates the timekeeper to the current time and* current NTP tick length

函数原型:static void timekeeping_advance(enum timekeeping_adv_mode mode)

返回类型:void

参数:

类型参数名称
enum timekeeping_adv_modemode
2050  real_tk等于timekeeper
2051  tk等于shadow_timekeeper
2053  shift等于0
2054  clock_set等于0
2057  raw_spin_lock_irqsave( & timekeeper_lock, flags)
2060  如果此条件成立可能性小(为编译器优化)(lag for if timekeeping is suspended )则转到:out
2069  offset等于clocksource_delta(k_clock_read - atomic clocksource read() helper* This helper is necessary to use in the read paths because, while the* seqlock ensures we don't return a bad value while structures are updated,* it doesn't protect from potential crashes, cycle_last, mask)
2073  如果offset小于The following members are for timekeeping internal use mode恒等于 Update timekeeper when a tick has passed 则转到:out
2078  timekeeping_check_update(tk, offset)
2088  shift等于log2 - log base 2 of 32-bit or a 64-bit unsigned value*@n: parameter* constant-capable log of base 2 calculation* - this can be used to initialise global variables from constant data, hence* the massive ternary operator construction* selects the (offset)减log2 - log base 2 of 32-bit or a 64-bit unsigned value*@n: parameter* constant-capable log of base 2 calculation* - this can be used to initialise global variables from constant data, hence* the massive ternary operator construction* selects the (The following members are for timekeeping internal use )
2089  shift等于两数取大(0, shift)
2091  maxshift等于64减log2 - log base 2 of 32-bit or a 64-bit unsigned value*@n: parameter* constant-capable log of base 2 calculation* - this can be used to initialise global variables from constant data, hence* the massive ternary operator construction* selects the (Returns how long ticks are at present, in ns / 2^NTP_SCALE_SHIFT. )加1减1
2092  shift等于两数取小(shift, maxshift)
2093 offset大于等于The following members are for timekeeping internal use 循环
2094  offset等于logarithmic_accumulation - shifted accumulation of cycles* This functions accumulates a shifted interval of cycles into* into a shifted interval nanoseconds. Allows for O(log) accumulation* loop.* Returns the unconsumed cycles.
2096  如果offset小于The following members are for timekeeping internal use 左移shift位则shift自减
2101  Adjust the timekeeper's multiplier to the correct frequency* and also to reduce the accumulated error value.
2107  clock_set或等于accumulate_nsecs_to_secs - Accumulates nsecs into secs* Helper function that accumulates the nsecs greater than a second* from the xtime_nsec field to the xtime_secs field.* It also calls into the NTP code to handle leapsecond processing.
2109  write_seqcount_begin( & seq)
2120  must hold timekeeper_lock
2121  内存复制(real_tk, tk, tk的长度)
2123  write_seqcount_end( & seq)
2124  out :
2125  raw_spin_unlock_irqrestore( & timekeeper_lock, flags)
2126  如果clock_setclock_was_set_delayed()
调用者
名称描述
update_wall_time更新时钟
do_adjtimexdo_adjtimex() - Accessor function to NTP __do_adjtimex function