Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:mekeeping_inject_offset - Adds or subtracts from the current time.*@tv: pointer to the timespec variable containing the offset* Adds or subtracts an offset value from the current time.

Proto:static int timekeeping_inject_offset(const struct timespec64 *ts)

Type:int

Parameter:

TypeParameterName
const struct timespec64 *ts
1275  tk = timekeeper
1278  ret = 0
1280  If nanoseconds < 0 || nanoseconds >= NSEC_PER_SEC Then Return -EINVAL
1283  raw_spin_lock_irqsave( & timekeeper_lock, flags)
1284  write_seqcount_begin( & seq)
1286  mekeeping_forward_now - update clock to the current time* Forward the current clock to update its state since the last call to* update_wall_time(). This is useful before significant clock changes,
1289  tmp = timespec64_add(tk_xtime(tk), * ts)
1290  If lhs < rhs: return <0* lhs == rhs: return 0* lhs > rhs: return >0 > 0 || Not timespec64_valid_settod( & tmp) Then
1292  ret = -EINVAL
1293  Go to error
1296  tk_xtime_add(tk, ts)
1297  tk_set_wall_to_mono(tk, sub = lhs - rhs, in normalized form)
1299  error :
1300  must hold timekeeper_lock
1302  write_seqcount_end( & seq)
1303  raw_spin_unlock_irqrestore( & timekeeper_lock, flags)
1306  Clock realtime was set* Change the offset of the realtime clock vs. the monotonic* clock.* We might have to reprogram the high resolution timer interrupt. On* SMP we call the architecture specific code to retrigger _all_ high* resolution timer interrupts
1308  Return ret
Caller
NameDescribe
timekeeping_warp_clockAdjust the time obtained from the CMOS to be UTC time instead of* local time
do_adjtimexdo_adjtimex() - Accessor function to NTP __do_adjtimex function