Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:ktime_get_snapshot - snapshots the realtime/monotonic raw clocks with counter*@systime_snapshot: pointer to struct receiving the system time snapshot

Proto:void ktime_get_snapshot(struct system_time_snapshot *systime_snapshot)

Type:void

Parameter:

TypeParameterName
struct system_time_snapshot *systime_snapshot
969  tk = timekeeper
977  WARN_ON_ONCE(lag for if timekeeping is suspended )
979  Do
980  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
981  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
982  cs_was_changed_seq = cs_was_changed_seq
983  clock_was_set_seq = clock_was_set_seq
984  base_real = Add two ktime_t variables. res = lhs + rhs: (base, offs_real)
986  base_raw = base
987  nsec_real = timekeeping_cycles_to_ns( & tkr_mono, now)
988  nsec_raw = timekeeping_cycles_to_ns( & tkr_raw, now)
989  When 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 cycle
991  cycles = now
992  real = Add a ktime_t variable and a scalar nanosecond value.* res = kt + nsval:(base_real, nsec_real)
993  raw = Add a ktime_t variable and a scalar nanosecond value.* res = kt + nsval:(base_raw, nsec_raw)