Elliott Hughes | 180edef | 2023-11-02 00:08:05 +0000 | [diff] [blame] | 1 | /* |
| 2 | * This file is auto-generated. Modifications will be lost. |
| 3 | * |
| 4 | * See https://android.googlesource.com/platform/bionic/+/master/libc/kernel/ |
| 5 | * for more information. |
| 6 | */ |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 7 | #ifndef _UAPI_LINUX_TIMEX_H |
| 8 | #define _UAPI_LINUX_TIMEX_H |
| 9 | #include <linux/time.h> |
| 10 | #define NTP_API 4 |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 11 | struct timex { |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 12 | unsigned int modes; |
| 13 | __kernel_long_t offset; |
| 14 | __kernel_long_t freq; |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 15 | __kernel_long_t maxerror; |
| 16 | __kernel_long_t esterror; |
| 17 | int status; |
| 18 | __kernel_long_t constant; |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 19 | __kernel_long_t precision; |
| 20 | __kernel_long_t tolerance; |
| 21 | struct timeval time; |
| 22 | __kernel_long_t tick; |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 23 | __kernel_long_t ppsfreq; |
| 24 | __kernel_long_t jitter; |
| 25 | int shift; |
| 26 | __kernel_long_t stabil; |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 27 | __kernel_long_t jitcnt; |
| 28 | __kernel_long_t calcnt; |
| 29 | __kernel_long_t errcnt; |
| 30 | __kernel_long_t stbcnt; |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 31 | int tai; |
| 32 | int : 32; |
| 33 | int : 32; |
| 34 | int : 32; |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 35 | int : 32; |
| 36 | int : 32; |
| 37 | int : 32; |
| 38 | int : 32; |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 39 | int : 32; |
| 40 | int : 32; |
| 41 | int : 32; |
| 42 | int : 32; |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 43 | }; |
Christopher Ferris | 24f97eb | 2019-05-20 12:58:13 -0700 | [diff] [blame] | 44 | struct __kernel_timex_timeval { |
| 45 | __kernel_time64_t tv_sec; |
| 46 | long long tv_usec; |
| 47 | }; |
| 48 | struct __kernel_timex { |
| 49 | unsigned int modes; |
| 50 | int : 32; |
| 51 | long long offset; |
| 52 | long long freq; |
| 53 | long long maxerror; |
| 54 | long long esterror; |
| 55 | int status; |
| 56 | int : 32; |
| 57 | long long constant; |
| 58 | long long precision; |
| 59 | long long tolerance; |
| 60 | struct __kernel_timex_timeval time; |
| 61 | long long tick; |
| 62 | long long ppsfreq; |
| 63 | long long jitter; |
| 64 | int shift; |
| 65 | int : 32; |
| 66 | long long stabil; |
| 67 | long long jitcnt; |
| 68 | long long calcnt; |
| 69 | long long errcnt; |
| 70 | long long stbcnt; |
| 71 | int tai; |
| 72 | int : 32; |
| 73 | int : 32; |
| 74 | int : 32; |
| 75 | int : 32; |
| 76 | int : 32; |
| 77 | int : 32; |
| 78 | int : 32; |
| 79 | int : 32; |
| 80 | int : 32; |
| 81 | int : 32; |
| 82 | int : 32; |
| 83 | }; |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 84 | #define ADJ_OFFSET 0x0001 |
| 85 | #define ADJ_FREQUENCY 0x0002 |
| 86 | #define ADJ_MAXERROR 0x0004 |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 87 | #define ADJ_ESTERROR 0x0008 |
| 88 | #define ADJ_STATUS 0x0010 |
| 89 | #define ADJ_TIMECONST 0x0020 |
| 90 | #define ADJ_TAI 0x0080 |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 91 | #define ADJ_SETOFFSET 0x0100 |
| 92 | #define ADJ_MICRO 0x1000 |
| 93 | #define ADJ_NANO 0x2000 |
| 94 | #define ADJ_TICK 0x4000 |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 95 | #define ADJ_OFFSET_SINGLESHOT 0x8001 |
| 96 | #define ADJ_OFFSET_SS_READ 0xa001 |
| 97 | #define MOD_OFFSET ADJ_OFFSET |
| 98 | #define MOD_FREQUENCY ADJ_FREQUENCY |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 99 | #define MOD_MAXERROR ADJ_MAXERROR |
| 100 | #define MOD_ESTERROR ADJ_ESTERROR |
| 101 | #define MOD_STATUS ADJ_STATUS |
| 102 | #define MOD_TIMECONST ADJ_TIMECONST |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 103 | #define MOD_TAI ADJ_TAI |
| 104 | #define MOD_MICRO ADJ_MICRO |
| 105 | #define MOD_NANO ADJ_NANO |
| 106 | #define STA_PLL 0x0001 |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 107 | #define STA_PPSFREQ 0x0002 |
| 108 | #define STA_PPSTIME 0x0004 |
| 109 | #define STA_FLL 0x0008 |
| 110 | #define STA_INS 0x0010 |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 111 | #define STA_DEL 0x0020 |
| 112 | #define STA_UNSYNC 0x0040 |
| 113 | #define STA_FREQHOLD 0x0080 |
| 114 | #define STA_PPSSIGNAL 0x0100 |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 115 | #define STA_PPSJITTER 0x0200 |
| 116 | #define STA_PPSWANDER 0x0400 |
| 117 | #define STA_PPSERROR 0x0800 |
| 118 | #define STA_CLOCKERR 0x1000 |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 119 | #define STA_NANO 0x2000 |
| 120 | #define STA_MODE 0x4000 |
| 121 | #define STA_CLK 0x8000 |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 122 | #define STA_RONLY (STA_PPSSIGNAL | STA_PPSJITTER | STA_PPSWANDER | STA_PPSERROR | STA_CLOCKERR | STA_NANO | STA_MODE | STA_CLK) |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 123 | #define TIME_OK 0 |
| 124 | #define TIME_INS 1 |
| 125 | #define TIME_DEL 2 |
| 126 | #define TIME_OOP 3 |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 127 | #define TIME_WAIT 4 |
| 128 | #define TIME_ERROR 5 |
| 129 | #define TIME_BAD TIME_ERROR |
| 130 | #endif |