Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:do_settimeofday64 - Sets the time of day.*@ts: pointer to the timespec64 variable containing the new time* Sets the time of day to the new time and update NTP and notify hrtimers

Proto:int do_settimeofday64(const struct timespec64 *ts)

Type:int

Parameter:

TypeParameterName
const struct timespec64 *ts
1226  tk = timekeeper
1229  ret = 0
1231  If Not timespec64_valid_settod(ts) Then Return -EINVAL
1234  raw_spin_lock_irqsave( & timekeeper_lock, flags)
1235  write_seqcount_begin( & seq)
1237  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,
1239  xt = tk_xtime(tk)
1240  seconds = seconds - seconds
1241  nanoseconds = nanoseconds - nanoseconds
1243  If lhs < rhs: return <0* lhs == rhs: return 0* lhs > rhs: return >0 > 0 Then
1244  ret = -EINVAL
1245  Go to out
1248  tk_set_wall_to_mono(tk, sub = lhs - rhs, in normalized form)
1250  tk_set_xtime(tk, ts)
1251  out :
1252  must hold timekeeper_lock
1254  write_seqcount_end( & seq)
1255  raw_spin_unlock_irqrestore( & timekeeper_lock, flags)
1258  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
1260  If Not ret Then audit_tk_injoffset(ts_delta)
1263  Return ret