.. | .. |
---|
57 | 57 | |
---|
58 | 58 | #define NTP_API 4 /* NTP API version */ |
---|
59 | 59 | |
---|
| 60 | +#ifndef __KERNEL__ |
---|
60 | 61 | /* |
---|
61 | 62 | * syscall interface - used (mainly by NTP daemon) |
---|
62 | 63 | * to discipline kernel clock oscillator |
---|
.. | .. |
---|
91 | 92 | int :32; int :32; int :32; int :32; |
---|
92 | 93 | int :32; int :32; int :32; |
---|
93 | 94 | }; |
---|
| 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 | +}; |
---|
94 | 135 | |
---|
95 | 136 | /* |
---|
96 | 137 | * Mode codes (timex.mode) |
---|