Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name: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.

Proto:static inline unsigned int accumulate_nsecs_to_secs(struct timekeeper *tk)

Type:unsigned int

Parameter:

TypeParameterName
struct timekeeper *tk
1963  nsecps = NSEC_PER_SEC << shift
1964  clock_set = 0
1966  When xtime_nsec >= nsecps cycle
1969  xtime_nsec -= nsecps
1970  xtime_sec++
1978  Continue
1982  leap = his routine handles the overflow of the microsecond field* The tricky bits of code to handle the accurate clock support* were provided by Dave Mills (Mills@UDEL.EDU) of NTP fame.* They were originally developed for SUN and DEC kernels.
1986  xtime_sec += leap
1988  seconds = leap
1989  nanoseconds = 0
1998  Return clock_set
Caller
NameDescribe
logarithmic_accumulationlogarithmic_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.
timekeeping_advancemekeeping_advance - Updates the timekeeper to the current time and* current NTP tick length