1 /**************************************************************************** 2 **************************************************************************** 3 *** 4 *** This header was automatically generated from a Linux kernel header 5 *** of the same name, to make information necessary for userspace to 6 *** call into the kernel available to libc. It contains only constants, 7 *** structures, and macros generated from the original header, and thus, 8 *** contains no copyrightable information. 9 *** 10 *** To edit the content of this header, modify the corresponding 11 *** source file (e.g. under external/kernel-headers/original/) then 12 *** run bionic/libc/kernel/tools/update_all.py 13 *** 14 *** Any manual change here will be lost the next time this script will 15 *** be run. You've been warned! 16 *** 17 **************************************************************************** 18 ****************************************************************************/ 19 #ifndef _UAPI_LINUX_TIMEX_H 20 #define _UAPI_LINUX_TIMEX_H 21 #include <linux/time.h> 22 #define NTP_API 4 23 struct timex { 24 unsigned int modes; 25 __kernel_long_t offset; 26 __kernel_long_t freq; 27 __kernel_long_t maxerror; 28 __kernel_long_t esterror; 29 int status; 30 __kernel_long_t constant; 31 __kernel_long_t precision; 32 __kernel_long_t tolerance; 33 struct timeval time; 34 __kernel_long_t tick; 35 __kernel_long_t ppsfreq; 36 __kernel_long_t jitter; 37 int shift; 38 __kernel_long_t stabil; 39 __kernel_long_t jitcnt; 40 __kernel_long_t calcnt; 41 __kernel_long_t errcnt; 42 __kernel_long_t stbcnt; 43 int tai; 44 int : 32; 45 int : 32; 46 int : 32; 47 int : 32; 48 int : 32; 49 int : 32; 50 int : 32; 51 int : 32; 52 int : 32; 53 int : 32; 54 int : 32; 55 }; 56 struct __kernel_timex_timeval { 57 __kernel_time64_t tv_sec; 58 long long tv_usec; 59 }; 60 struct __kernel_timex { 61 unsigned int modes; 62 int : 32; 63 long long offset; 64 long long freq; 65 long long maxerror; 66 long long esterror; 67 int status; 68 int : 32; 69 long long constant; 70 long long precision; 71 long long tolerance; 72 struct __kernel_timex_timeval time; 73 long long tick; 74 long long ppsfreq; 75 long long jitter; 76 int shift; 77 int : 32; 78 long long stabil; 79 long long jitcnt; 80 long long calcnt; 81 long long errcnt; 82 long long stbcnt; 83 int tai; 84 int : 32; 85 int : 32; 86 int : 32; 87 int : 32; 88 int : 32; 89 int : 32; 90 int : 32; 91 int : 32; 92 int : 32; 93 int : 32; 94 int : 32; 95 }; 96 #define ADJ_OFFSET 0x0001 97 #define ADJ_FREQUENCY 0x0002 98 #define ADJ_MAXERROR 0x0004 99 #define ADJ_ESTERROR 0x0008 100 #define ADJ_STATUS 0x0010 101 #define ADJ_TIMECONST 0x0020 102 #define ADJ_TAI 0x0080 103 #define ADJ_SETOFFSET 0x0100 104 #define ADJ_MICRO 0x1000 105 #define ADJ_NANO 0x2000 106 #define ADJ_TICK 0x4000 107 #define ADJ_OFFSET_SINGLESHOT 0x8001 108 #define ADJ_OFFSET_SS_READ 0xa001 109 #define MOD_OFFSET ADJ_OFFSET 110 #define MOD_FREQUENCY ADJ_FREQUENCY 111 #define MOD_MAXERROR ADJ_MAXERROR 112 #define MOD_ESTERROR ADJ_ESTERROR 113 #define MOD_STATUS ADJ_STATUS 114 #define MOD_TIMECONST ADJ_TIMECONST 115 #define MOD_TAI ADJ_TAI 116 #define MOD_MICRO ADJ_MICRO 117 #define MOD_NANO ADJ_NANO 118 #define STA_PLL 0x0001 119 #define STA_PPSFREQ 0x0002 120 #define STA_PPSTIME 0x0004 121 #define STA_FLL 0x0008 122 #define STA_INS 0x0010 123 #define STA_DEL 0x0020 124 #define STA_UNSYNC 0x0040 125 #define STA_FREQHOLD 0x0080 126 #define STA_PPSSIGNAL 0x0100 127 #define STA_PPSJITTER 0x0200 128 #define STA_PPSWANDER 0x0400 129 #define STA_PPSERROR 0x0800 130 #define STA_CLOCKERR 0x1000 131 #define STA_NANO 0x2000 132 #define STA_MODE 0x4000 133 #define STA_CLK 0x8000 134 #define STA_RONLY (STA_PPSSIGNAL | STA_PPSJITTER | STA_PPSWANDER | STA_PPSERROR | STA_CLOCKERR | STA_NANO | STA_MODE | STA_CLK) 135 #define TIME_OK 0 136 #define TIME_INS 1 137 #define TIME_DEL 2 138 #define TIME_OOP 3 139 #define TIME_WAIT 4 140 #define TIME_ERROR 5 141 #define TIME_BAD TIME_ERROR 142 #endif 143