Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:adjust_historical_crosststamp - adjust crosstimestamp previous to current interval*@history: Snapshot representing start of history*@partial_history_cycles: Cycle offset into history (fractional part)*@total_history_cycles: Total history length in

Proto:static int adjust_historical_crosststamp(struct system_time_snapshot *history, u64 partial_history_cycles, u64 total_history_cycles, bool discontinuity, struct system_device_crosststamp *ts)

Type:int

Parameter:

TypeParameterName
struct system_time_snapshot *history
u64partial_history_cycles
u64total_history_cycles
booldiscontinuity
struct system_device_crosststamp *ts
1038  tk = timekeeper
1043  If total_history_cycles == 0 || partial_history_cycles == 0 Then Return 0
1047  interp_forward = partial_history_cycles > total_history_cycles / 2
1048  partial_history_cycles = If interp_forward Then total_history_cycles - partial_history_cycles Else partial_history_cycles
1056  corr_raw = Convert ktime_t to nanoseconds
1058  ret = Scale base by mult/div checking for overflow
1060  If ret Then Return ret
1070  If discontinuity Then
1071  corr_real = mul_u64_u32_div(corr_raw, mult, mult)
1073  Else
1074  corr_real = Convert ktime_t to nanoseconds
1076  ret = Scale base by mult/div checking for overflow
1078  If ret Then Return ret
1083  If interp_forward Then
1084  sys_monoraw = Add a ktime_t variable and a scalar nanosecond value.* res = kt + nsval:(raw, corr_raw)
1085  sys_realtime = Add a ktime_t variable and a scalar nanosecond value.* res = kt + nsval:(real, corr_real)
1086  Else
1087  sys_monoraw = Subtract a scalar nanosecod from a ktime_t variable* res = kt - nsval:(sys_monoraw, corr_raw)
1088  sys_realtime = Subtract a scalar nanosecod from a ktime_t variable* res = kt - nsval:(sys_realtime, corr_real)
1091  Return 0
Caller
NameDescribe
get_device_system_crosststampget_device_system_crosststamp - Synchronously capture system/device timestamp*@get_time_fn: Callback to get simultaneous device time and* system counter from the device driver*@ctx: Context passed to get_time_fn()*@history_begin: Historical reference