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 _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 #define ADJ_OFFSET 0x0001
     57 #define ADJ_FREQUENCY 0x0002
     58 #define ADJ_MAXERROR 0x0004
     59 #define ADJ_ESTERROR 0x0008
     60 #define ADJ_STATUS 0x0010
     61 #define ADJ_TIMECONST 0x0020
     62 #define ADJ_TAI 0x0080
     63 #define ADJ_SETOFFSET 0x0100
     64 #define ADJ_MICRO 0x1000
     65 #define ADJ_NANO 0x2000
     66 #define ADJ_TICK 0x4000
     67 #define ADJ_OFFSET_SINGLESHOT 0x8001
     68 #define ADJ_OFFSET_SS_READ 0xa001
     69 #define MOD_OFFSET ADJ_OFFSET
     70 #define MOD_FREQUENCY ADJ_FREQUENCY
     71 #define MOD_MAXERROR ADJ_MAXERROR
     72 #define MOD_ESTERROR ADJ_ESTERROR
     73 #define MOD_STATUS ADJ_STATUS
     74 #define MOD_TIMECONST ADJ_TIMECONST
     75 #define MOD_TAI ADJ_TAI
     76 #define MOD_MICRO ADJ_MICRO
     77 #define MOD_NANO ADJ_NANO
     78 #define STA_PLL 0x0001
     79 #define STA_PPSFREQ 0x0002
     80 #define STA_PPSTIME 0x0004
     81 #define STA_FLL 0x0008
     82 #define STA_INS 0x0010
     83 #define STA_DEL 0x0020
     84 #define STA_UNSYNC 0x0040
     85 #define STA_FREQHOLD 0x0080
     86 #define STA_PPSSIGNAL 0x0100
     87 #define STA_PPSJITTER 0x0200
     88 #define STA_PPSWANDER 0x0400
     89 #define STA_PPSERROR 0x0800
     90 #define STA_CLOCKERR 0x1000
     91 #define STA_NANO 0x2000
     92 #define STA_MODE 0x4000
     93 #define STA_CLK 0x8000
     94 #define STA_RONLY (STA_PPSSIGNAL | STA_PPSJITTER | STA_PPSWANDER | STA_PPSERROR | STA_CLOCKERR | STA_NANO | STA_MODE | STA_CLK)
     95 #define TIME_OK 0
     96 #define TIME_INS 1
     97 #define TIME_DEL 2
     98 #define TIME_OOP 3
     99 #define TIME_WAIT 4
    100 #define TIME_ERROR 5
    101 #define TIME_BAD TIME_ERROR
    102 #endif
    103