hc
2024-05-10 10ebd8556b7990499c896a550e3d416b444211e6
kernel/include/uapi/linux/timex.h
....@@ -57,6 +57,7 @@
5757
5858 #define NTP_API 4 /* NTP API version */
5959
60
+#ifndef __KERNEL__
6061 /*
6162 * syscall interface - used (mainly by NTP daemon)
6263 * to discipline kernel clock oscillator
....@@ -91,6 +92,46 @@
9192 int :32; int :32; int :32; int :32;
9293 int :32; int :32; int :32;
9394 };
95
+#endif
96
+
97
+struct __kernel_timex_timeval {
98
+ __kernel_time64_t tv_sec;
99
+ long long tv_usec;
100
+};
101
+
102
+struct __kernel_timex {
103
+ unsigned int modes; /* mode selector */
104
+ int :32; /* pad */
105
+ long long offset; /* time offset (usec) */
106
+ long long freq; /* frequency offset (scaled ppm) */
107
+ long long maxerror;/* maximum error (usec) */
108
+ long long esterror;/* estimated error (usec) */
109
+ int status; /* clock command/status */
110
+ int :32; /* pad */
111
+ long long constant;/* pll time constant */
112
+ long long precision;/* clock precision (usec) (read only) */
113
+ long long tolerance;/* clock frequency tolerance (ppm)
114
+ * (read only)
115
+ */
116
+ struct __kernel_timex_timeval time; /* (read only, except for ADJ_SETOFFSET) */
117
+ long long tick; /* (modified) usecs between clock ticks */
118
+
119
+ long long ppsfreq;/* pps frequency (scaled ppm) (ro) */
120
+ long long jitter; /* pps jitter (us) (ro) */
121
+ int shift; /* interval duration (s) (shift) (ro) */
122
+ int :32; /* pad */
123
+ long long stabil; /* pps stability (scaled ppm) (ro) */
124
+ long long jitcnt; /* jitter limit exceeded (ro) */
125
+ long long calcnt; /* calibration intervals (ro) */
126
+ long long errcnt; /* calibration errors (ro) */
127
+ long long stbcnt; /* stability limit exceeded (ro) */
128
+
129
+ int tai; /* TAI offset (ro) */
130
+
131
+ int :32; int :32; int :32; int :32;
132
+ int :32; int :32; int :32; int :32;
133
+ int :32; int :32; int :32;
134
+};
94135
95136 /*
96137 * Mode codes (timex.mode)