hjl / source-git / glibc

Forked from source-git/glibc 4 years ago
Clone

Blame sysdeps/unix/sysv/linux/alpha/adjtime.c

Packit 6c4009
/* Copyright (C) 1998-2018 Free Software Foundation, Inc.
Packit 6c4009
   This file is part of the GNU C Library.
Packit 6c4009
Packit 6c4009
   The GNU C Library is free software; you can redistribute it and/or
Packit 6c4009
   modify it under the terms of the GNU Lesser General Public
Packit 6c4009
   License as published by the Free Software Foundation; either
Packit 6c4009
   version 2.1 of the License, or (at your option) any later version.
Packit 6c4009
Packit 6c4009
   The GNU C Library is distributed in the hope that it will be useful,
Packit 6c4009
   but WITHOUT ANY WARRANTY; without even the implied warranty of
Packit 6c4009
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
Packit 6c4009
   Lesser General Public License for more details.
Packit 6c4009
Packit 6c4009
   You should have received a copy of the GNU Lesser General Public
Packit 6c4009
   License along with the GNU C Library.  If not, see
Packit 6c4009
   <http://www.gnu.org/licenses/>.  */
Packit 6c4009
Packit 6c4009
#include <shlib-compat.h>
Packit 6c4009
#include <sysdep.h>
Packit 6c4009
#include <sys/time.h>
Packit 6c4009
Packit 6c4009
Packit 6c4009
#if SHLIB_COMPAT (libc, GLIBC_2_0, GLIBC_2_1)
Packit 6c4009
struct timeval32
Packit 6c4009
{
Packit 6c4009
    int tv_sec, tv_usec;
Packit 6c4009
};
Packit 6c4009
Packit 6c4009
struct timex32 {
Packit 6c4009
	unsigned int modes;	/* mode selector */
Packit 6c4009
	long offset;		/* time offset (usec) */
Packit 6c4009
	long freq;		/* frequency offset (scaled ppm) */
Packit 6c4009
	long maxerror;		/* maximum error (usec) */
Packit 6c4009
	long esterror;		/* estimated error (usec) */
Packit 6c4009
	int status;		/* clock command/status */
Packit 6c4009
	long constant;		/* pll time constant */
Packit 6c4009
	long precision;		/* clock precision (usec) (read only) */
Packit 6c4009
	long tolerance;		/* clock frequency tolerance (ppm)
Packit 6c4009
				 * (read only)
Packit 6c4009
				 */
Packit 6c4009
	struct timeval32 time;	/* (read only) */
Packit 6c4009
	long tick;		/* (modified) usecs between clock ticks */
Packit 6c4009
Packit 6c4009
	long ppsfreq;           /* pps frequency (scaled ppm) (ro) */
Packit 6c4009
	long jitter;            /* pps jitter (us) (ro) */
Packit 6c4009
	int shift;              /* interval duration (s) (shift) (ro) */
Packit 6c4009
	long stabil;            /* pps stability (scaled ppm) (ro) */
Packit 6c4009
	long jitcnt;            /* jitter limit exceeded (ro) */
Packit 6c4009
	long calcnt;            /* calibration intervals (ro) */
Packit 6c4009
	long errcnt;            /* calibration errors (ro) */
Packit 6c4009
	long stbcnt;            /* stability limit exceeded (ro) */
Packit 6c4009
Packit 6c4009
	int  :32; int  :32; int  :32; int  :32;
Packit 6c4009
	int  :32; int  :32; int  :32; int  :32;
Packit 6c4009
	int  :32; int  :32; int  :32; int  :32;
Packit 6c4009
};
Packit 6c4009
Packit 6c4009
#define TIMEVAL		timeval32
Packit 6c4009
#define TIMEX		timex32
Packit 6c4009
#define ADJTIME		attribute_compat_text_section __adjtime_tv32
Packit 6c4009
#define ADJTIMEX(x)	INLINE_SYSCALL (old_adjtimex, 1, x)
Packit 6c4009
#define ADJTIMEX32(x)	INLINE_SYSCALL (old_adjtimex, 1, x)
Packit 6c4009
Packit 6c4009
#include <sysdeps/unix/sysv/linux/adjtime.c>
Packit 6c4009
Packit 6c4009
int attribute_compat_text_section
Packit 6c4009
__adjtimex_tv32 (struct timex32 *tx) { return ADJTIMEX (tx); }
Packit 6c4009
Packit 6c4009
strong_alias (__adjtimex_tv32, __adjtimex_tv32_1);
Packit 6c4009
strong_alias (__adjtimex_tv32, __adjtimex_tv32_2);
Packit 6c4009
compat_symbol (libc, __adjtimex_tv32_1, __adjtimex, GLIBC_2_0);
Packit 6c4009
compat_symbol (libc, __adjtimex_tv32_2, adjtimex, GLIBC_2_0);
Packit 6c4009
compat_symbol (libc, __adjtime_tv32, adjtime, GLIBC_2_0);
Packit 6c4009
#endif /* SHLIB_COMPAT */
Packit 6c4009
Packit 6c4009
#undef TIMEVAL
Packit 6c4009
#undef TIMEX
Packit 6c4009
#undef ADJTIME
Packit 6c4009
#undef ADJTIMEX
Packit 6c4009
#define TIMEVAL		timeval
Packit 6c4009
#define TIMEX		timex
Packit 6c4009
#define ADJTIMEX(x)	INLINE_SYSCALL (adjtimex, 1, x)
Packit 6c4009
Packit 6c4009
#include <sysdeps/unix/sysv/linux/adjtime.c>
Packit 6c4009
Packit 6c4009
int
Packit 6c4009
__adjtimex_tv64 (struct timex *tx) { return ADJTIMEX (tx); }
Packit 6c4009
Packit 6c4009
libc_hidden_ver (__adjtimex_tv64, __adjtimex)
Packit 6c4009
strong_alias (__adjtimex_tv64, __adjtimex_tv64p);
Packit 6c4009
weak_alias (__adjtimex_tv64, ntp_adjtime);
Packit 6c4009
versioned_symbol (libc, __adjtimex_tv64, __adjtimex, GLIBC_2_1);
Packit 6c4009
versioned_symbol (libc, __adjtimex_tv64p, adjtimex, GLIBC_2_1);
Packit 6c4009
versioned_symbol (libc, __adjtime, adjtime, GLIBC_2_1);