1#ifndef __VSF_LINUX_SYS_TIMEX_H__
2#define __VSF_LINUX_SYS_TIMEX_H__
6#if VSF_LINUX_CFG_RELATIVE_PATH == ENABLED
16#define ADJ_OFFSET 0x0001
17#define ADJ_FREQUENCY 0x0002
18#define ADJ_MAXERROR 0x0004
19#define ADJ_ESTERROR 0x0008
20#define ADJ_STATUS 0x0010
21#define ADJ_TIMECONST 0x0020
22#define ADJ_TICK 0x4000
23#define ADJ_OFFSET_SINGLESHOT 0x8001
25#define MOD_OFFSET ADJ_OFFSET
26#define MOD_FREQUENCY ADJ_FREQUENCY
27#define MOD_MAXERROR ADJ_MAXERROR
28#define MOD_ESTERROR ADJ_ESTERROR
29#define MOD_STATUS ADJ_STATUS
30#define MOD_TIMECONST ADJ_TIMECONST
33#define STA_PPSFREQ 0x0002
34#define STA_PPSTIME 0x0004
39#define STA_UNSYNC 0x0040
40#define STA_FREQHOLD 0x0080
42#define STA_PPSSIGNAL 0x0100
43#define STA_PPSJITTER 0x0200
44#define STA_PPSWANDER 0x0400
45#define STA_PPSERROR 0x0800
47#define STA_CLOCKERR 0x1000
49#define STA_RONLY (STA_PPSSIGNAL | STA_PPSJITTER | STA_PPSWANDER | STA_PPSERROR | STA_CLOCKERR)
57#define TIME_BAD TIME_ERROR
71#if VSF_LINUX_APPLET_USE_SYS_TIMEX == ENABLED
79# ifndef __VSF_APPLET__
84#if defined(__VSF_APPLET__) && (defined(__VSF_APPLET_LIB__) || defined(__VSF_APPLET_LINUX_SYS_TIMEX_LIB__))\
85 && VSF_APPLET_CFG_ABI_PATCH != ENABLED && VSF_LINUX_APPLET_USE_SYS_TIMEX == ENABLED
87#ifndef VSF_LINUX_APPLET_SYS_TIMEX_VPLT
88# if VSF_LINUX_USE_APPLET == ENABLED
89# define VSF_LINUX_APPLET_SYS_TIMEX_VPLT \
90 ((vsf_linux_sys_timex_vplt_t *)(VSF_LINUX_APPLET_VPLT->sys_timex_vplt))
92# define VSF_LINUX_APPLET_SYS_TIMEX_VPLT \
93 ((vsf_linux_sys_timex_vplt_t *)vsf_vplt((void *)0))
97#define VSF_LINUX_APPLET_SYS_TIMEX_ENTRY(__NAME) \
98 VSF_APPLET_VPLT_ENTRY_FUNC_ENTRY(VSF_LINUX_APPLET_SYS_TIMEX_VPLT, __NAME)
99#define VSF_LINUX_APPLET_SYS_TIMEX_IMP(...) \
100 VSF_APPLET_VPLT_ENTRY_FUNC_IMP(VSF_LINUX_APPLET_SYS_TIMEX_VPLT, __VA_ARGS__)
102VSF_LINUX_APPLET_SYS_TIMEX_IMP(
adjtimex,
int,
struct timex *buf) {
104 return VSF_LINUX_APPLET_SYS_TIMEX_ENTRY(
adjtimex)(buf);
108 return VSF_LINUX_APPLET_SYS_TIMEX_ENTRY(
clock_adjtime)(clk_id, buf);
112 return VSF_LINUX_APPLET_SYS_TIMEX_ENTRY(
ntp_adjtime)(buf);
clockid_t
Definition types.h:138
long freq
Definition timex.h:62
long offset
Definition timex.h:61
int status
Definition timex.h:65
long constant
Definition timex.h:66
long maxerror
Definition timex.h:63
unsigned int modes
Definition timex.h:60
long esterror
Definition timex.h:64
long tolerance
Definition timex.h:68
long precision
Definition timex.h:67
vsf_vplt_info_t info
Definition timex.h:73
VSF_APPLET_VPLT_ENTRY_FUNC_DEF(clock_adjtime)
VSF_APPLET_VPLT_ENTRY_FUNC_DEF(adjtimex)
VSF_APPLET_VPLT_ENTRY_FUNC_DEF(ntp_adjtime)
int adjtimex(struct timex *buf)
Definition vsf_linux.c:4692
int clock_adjtime(clockid_t clk_id, struct timex *buf)
Definition vsf_linux.c:4697
__VSF_VPLT_DECORATOR__ vsf_linux_sys_timex_vplt_t vsf_linux_sys_timex_vplt
Definition vsf_linux.c:4792
int ntp_adjtime(struct timex *buf)
Definition vsf_linux.c:4702
#define __VSF_VPLT_DECORATOR__
Definition vsf_cfg.h:93
#define VSF_APPLET_VPLT_ENTRY_FUNC_TRACE()
Definition vsf_cfg.h:165