函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

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

函数原型:static int timekeeping_inject_offset(const struct timespec64 *ts)

返回类型:int

参数:

类型参数名称
const struct timespec64 *ts
1275  tk等于timekeeper
1278  ret等于0
1280  如果 nanoseconds 小于0或 nanoseconds 大于等于NSEC_PER_SEC则返回:负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  如果lhs < rhs: return <0* lhs == rhs: return 0* lhs > rhs: return >0大于0或非timespec64_valid_settod( & tmp)则
1292  ret等于负EINVAL
1293  转到: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  返回:ret
调用者
名称描述
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