Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:mekeeping_advance - Updates the timekeeper to the current time and* current NTP tick length

Proto:static void timekeeping_advance(enum timekeeping_adv_mode mode)

Type:void

Parameter:

TypeParameterName
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  If Value for the false possibility is greater at compile time(lag for if timekeeping is suspended ) Then Go to 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  If offset < The following members are for timekeeping internal use && mode == Update timekeeper when a tick has passed Then Go to 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 = max - return maximum of two values of the same or compatible types*@x: first value*@y: second value(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 = min - return minimum of two values of the same or compatible types*@x: first value*@y: second value(shift, maxshift)
2093  When offset >= The following members are for timekeeping internal use cycle
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  If offset < The following members are for timekeeping internal use << shift Then 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  No 3D Now!(real_tk, tk, size of tk )
2123  write_seqcount_end( & seq)
2124  out :
2125  raw_spin_unlock_irqrestore( & timekeeper_lock, flags)
2126  If clock_set Then clock_was_set_delayed()
Caller
NameDescribe
update_wall_timepdate_wall_time - Uses the current clocksource to increment the wall time
do_adjtimexdo_adjtimex() - Accessor function to NTP __do_adjtimex function