函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:get_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

函数原型:int get_device_system_crosststamp(int (*get_time_fn)(ktime_t *device_time, struct system_counterval_t *sys_counterval, void *ctx), void *ctx, struct system_time_snapshot *history_begin, struct system_device_crosststamp *xtstamp)

返回类型:int

参数:

类型参数名称
int (*get_time_fn
void *ctx
struct system_time_snapshot *history_begin
struct system_device_crosststamp *xtstamp
1126  tk等于timekeeper
1128  clock_was_set_seq等于0
1136  循环
1137  seq等于ad_seqcount_begin - begin a seq-read critical section*@s: pointer to seqcount_t* Returns: count to be passed to read_seqcount_retry* read_seqcount_begin opens a read critical section of the given seqcount
1142  ret等于get_time_fn( & device, & system_counterval, ctx)
1143  如果ret则返回:ret
1151  如果clock不等于cs则返回:负ENODEV
1153  cycles等于cycles
1159  now等于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
1160  interval_start等于cycle_last
1164  cycles等于interval_start
1165  do_interp = true
1166  否则
1167  do_interp = false
1170  base_real等于计算下一次触发时间(base, offs_real)
1172  base_raw等于base
1174  nsec_real等于timekeeping_cycles_to_ns( & tkr_mono, cycles)
1176  nsec_raw等于timekeeping_cycles_to_ns( & tkr_raw, cycles)
1178 ad_seqcount_retry - end a seq-read critical section*@s: pointer to seqcount_t*@start: count, from read_seqcount_begin* Returns: 1 if retry is required, else 0* read_seqcount_retry closes a read critical section of the given seqcount循环
1180  sys_realtime等于Add a ktime_t variable and a scalar nanosecond value.* res = kt + nsval:(base_real, nsec_real)
1181  sys_monoraw等于Add a ktime_t variable and a scalar nanosecond value.* res = kt + nsval:(base_raw, nsec_raw)
1187  如果do_interp
1196  如果非history_begin或非ycle_between - true if test occurs chronologically between before and aftercs_was_changed_seq不等于cs_was_changed_seq则返回:负EINVAL
1201  partial_history_cycles等于cyclescycles
1202  total_history_cycles等于cyclescycles
1203  discontinuity等于clock_was_set_seq不等于clock_was_set_seq
1206  ret等于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
1210  如果ret则返回:ret
1214  返回:0