函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:k_setup_internals - Set up internals to use clocksource clock

函数原型:static void tk_setup_internals(struct timekeeper *tk, struct clocksource *clock)

返回类型:void

参数:

类型参数名称
struct timekeeper *tk
struct clocksource *clock
293  cs_was_changed_seq先自加
294  old_clock等于clock
295  clock等于clock
296  mask等于mask
297  cycle_last等于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
299  clock等于clock
300  mask等于mask
301  cycle_last等于cycle_last
304  tmp等于NTP_INTERVAL_LENGTH
305  tmp左移等于shift
306  ntpinterval等于tmp
307  tmp加等于mult除2
308  do_div() is NOT a C function(tmp, mult)
309  如果tmp恒等于0则tmp等于1
312  interval等于tmp
313  The following members are for timekeeping internal use 等于interval
316  xtime_interval等于intervalmult
317  xtime_remainder等于ntpintervalxtime_interval
318  raw_interval等于intervalmult
321  如果old_clock
322  shift_change等于shiftshift
323  如果shift_change小于0则
324  xtime_nsec右移等于负shift_change
325  xtime_nsec右移等于负shift_change
326  否则
327  xtime_nsec左移等于shift_change
328  xtime_nsec左移等于shift_change
332  shift等于shift
333  shift等于shift
335  Difference between accumulated time and NTP time in ntp* shifted nano seconds. 等于0
336  ntp_error_shift等于NTP_SCALE_SHIFTshift
337  The ntp_tick_length() value currently being used.* This cached copy ensures we consistently apply the tick* length for an entire tick, as ntp_tick_length may change* mid-tick, and we don't want to apply that new value to* the tick in progress.等于ntpinterval左移ntp_error_shift
344  mult等于mult
345  mult等于mult
346  ntp_err_mult等于0
347  Flag used to avoid updating NTP twice with same second 等于0
调用者
名称描述
change_clocksourcehange_clocksource - Swaps clocksources if a new one is available* Accumulates current time interval and initializes new clocksource
timekeeping_init初始化系统时钟计时