Home | History | Annotate | Download | only in linux
      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 _LINUX_TIMEX_H
     20 #define _LINUX_TIMEX_H
     21 #include <linux/compiler.h>
     22 #include <linux/time.h>
     23 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
     24 #include <asm/param.h>
     25 #define SHIFT_KG 6
     26 #define SHIFT_KF 16
     27 #define SHIFT_KH 2
     28 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
     29 #define MAXTC 6
     30 #define SHIFT_SCALE 22
     31 #define SHIFT_UPDATE (SHIFT_KG + MAXTC)
     32 #define SHIFT_USEC 16
     33 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
     34 #define FINENSEC (1L << (SHIFT_SCALE - 10))
     35 #define MAXPHASE 512000L
     36 #define MAXFREQ (512L << SHIFT_USEC)
     37 #define MINSEC 16L
     38 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
     39 #define MAXSEC 1200L
     40 #define NTP_PHASE_LIMIT (MAXPHASE << 5)
     41 struct timex {
     42  unsigned int modes;
     43 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
     44  long offset;
     45  long freq;
     46  long maxerror;
     47  long esterror;
     48 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
     49  int status;
     50  long constant;
     51  long precision;
     52  long tolerance;
     53 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
     54  struct timeval time;
     55  long tick;
     56  long ppsfreq;
     57  long jitter;
     58 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
     59  int shift;
     60  long stabil;
     61  long jitcnt;
     62  long calcnt;
     63 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
     64  long errcnt;
     65  long stbcnt;
     66  int :32; int :32; int :32; int :32;
     67  int :32; int :32; int :32; int :32;
     68 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
     69  int :32; int :32; int :32; int :32;
     70 };
     71 #define ADJ_OFFSET 0x0001
     72 #define ADJ_FREQUENCY 0x0002
     73 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
     74 #define ADJ_MAXERROR 0x0004
     75 #define ADJ_ESTERROR 0x0008
     76 #define ADJ_STATUS 0x0010
     77 #define ADJ_TIMECONST 0x0020
     78 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
     79 #define ADJ_TICK 0x4000
     80 #define ADJ_OFFSET_SINGLESHOT 0x8001
     81 #define MOD_OFFSET ADJ_OFFSET
     82 #define MOD_FREQUENCY ADJ_FREQUENCY
     83 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
     84 #define MOD_MAXERROR ADJ_MAXERROR
     85 #define MOD_ESTERROR ADJ_ESTERROR
     86 #define MOD_STATUS ADJ_STATUS
     87 #define MOD_TIMECONST ADJ_TIMECONST
     88 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
     89 #define MOD_CLKB ADJ_TICK
     90 #define MOD_CLKA ADJ_OFFSET_SINGLESHOT
     91 #define STA_PLL 0x0001
     92 #define STA_PPSFREQ 0x0002
     93 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
     94 #define STA_PPSTIME 0x0004
     95 #define STA_FLL 0x0008
     96 #define STA_INS 0x0010
     97 #define STA_DEL 0x0020
     98 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
     99 #define STA_UNSYNC 0x0040
    100 #define STA_FREQHOLD 0x0080
    101 #define STA_PPSSIGNAL 0x0100
    102 #define STA_PPSJITTER 0x0200
    103 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
    104 #define STA_PPSWANDER 0x0400
    105 #define STA_PPSERROR 0x0800
    106 #define STA_CLOCKERR 0x1000
    107 #define STA_RONLY (STA_PPSSIGNAL | STA_PPSJITTER | STA_PPSWANDER |   STA_PPSERROR | STA_CLOCKERR)
    108 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
    109 #define TIME_OK 0
    110 #define TIME_INS 1
    111 #define TIME_DEL 2
    112 #define TIME_OOP 3
    113 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
    114 #define TIME_WAIT 4
    115 #define TIME_ERROR 5
    116 #define TIME_BAD TIME_ERROR
    117 #endif
    118 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
    119