函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:adjtimex mainly allows reading (and writing, if superuser) of* kernel time-keeping variables. used by xntpd.

函数原型:int __do_adjtimex(struct __kernel_timex *txc, const struct timespec64 *ts, s32 *time_tai, struct audit_ntp_data *ad)

返回类型:int

参数:

类型参数名称
struct __kernel_timex *txc
const struct timespec64 *ts
s32 *time_tai
struct audit_ntp_data *ad
719  如果 mode selector 按位与switch between adjtime/adjtimex modes
720  save_adjust等于time_adjust
722  如果非 mode selector 按位与ad-only adjtime 的值则
730  time offset (usec) 等于save_adjust
731  否则
733  如果 mode selector
749  time offset (usec) 等于Required to safely shift negative values (ime adjustment (nsecs): * NTP_INTERVAL_FREQ, NTP_SCALE_SHIFT)
751  如果非clock status bits: 按位与solution (0 = us, 1 = ns) (ro) 的值则 time offset (usec) 等于 time offset (usec) NSEC_PER_USEC
755  result等于clock synchronization status* (TIME_ERROR prevents overwriting the CMOS clock)
757  如果is_error_status(clock status bits: )则result等于clock not synchronized
760  frequency offset (scaled ppm) 等于Required to safely shift negative values ((quency offset (scaled nsecs/secs): >> PPM_SCALE_INV_SHIFT) * PPM_SCALE_INV, NTP_SCALE_SHIFT)
762  maximum error (usec) 等于maximum error (usecs):
763  estimated error (usec) 等于stimated error (usecs):
764  clock command/status 等于clock status bits:
765  pll time constant 等于pll time constant:
766  clock precision (usec) (read only) 等于1
767  clock frequency tolerance (ppm) * (read only)等于MAXFREQ_SCALEDPPM_SCALE
768  (modified) usecs between clock ticks 等于USER_HZ period (usecs):
769  TAI offset (ro) 等于time_tai
772  pps_fill_timex(txc)
774  tv_sec等于 seconds
775  tv_usec等于 nanoseconds
776  如果非clock status bits: 按位与solution (0 = us, 1 = ns) (ro) 的值则tv_usec等于 nanoseconds NSEC_PER_USEC
780  如果此条件成立可能性小(为编译器优化)( seconds >= second value of the next pending leapsecond, or TIME64_MAX if no leap )则
783  TAI offset (ro) 自加
784  tv_sec自减
788  TAI offset (ro) 自减
789  tv_sec自加
797  返回:result
调用者
名称描述
do_adjtimexdo_adjtimex() - Accessor function to NTP __do_adjtimex function