Update copyright notices with scripts/update-copyrights
[glibc.git] / ports / sysdeps / unix / sysv / linux / alpha / adjtime.c
bloba0cbba3d17b7a8e9023fc0159e4dfa8656a1db2b
1 /* Copyright (C) 1998-2014 Free Software Foundation, Inc.
2 This file is part of the GNU C Library.
4 The GNU C Library is free software; you can redistribute it and/or
5 modify it under the terms of the GNU Lesser General Public
6 License as published by the Free Software Foundation; either
7 version 2.1 of the License, or (at your option) any later version.
9 The GNU C Library is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 Lesser General Public License for more details.
14 You should have received a copy of the GNU Lesser General Public
15 License along with the GNU C Library. If not, see
16 <http://www.gnu.org/licenses/>. */
18 #include <shlib-compat.h>
19 #include <sysdep.h>
20 #include <sys/time.h>
23 #if SHLIB_COMPAT (libc, GLIBC_2_0, GLIBC_2_1)
24 struct timeval32
26 int tv_sec, tv_usec;
29 struct timex32 {
30 unsigned int modes; /* mode selector */
31 long offset; /* time offset (usec) */
32 long freq; /* frequency offset (scaled ppm) */
33 long maxerror; /* maximum error (usec) */
34 long esterror; /* estimated error (usec) */
35 int status; /* clock command/status */
36 long constant; /* pll time constant */
37 long precision; /* clock precision (usec) (read only) */
38 long tolerance; /* clock frequency tolerance (ppm)
39 * (read only)
41 struct timeval32 time; /* (read only) */
42 long tick; /* (modified) usecs between clock ticks */
44 long ppsfreq; /* pps frequency (scaled ppm) (ro) */
45 long jitter; /* pps jitter (us) (ro) */
46 int shift; /* interval duration (s) (shift) (ro) */
47 long stabil; /* pps stability (scaled ppm) (ro) */
48 long jitcnt; /* jitter limit exceeded (ro) */
49 long calcnt; /* calibration intervals (ro) */
50 long errcnt; /* calibration errors (ro) */
51 long stbcnt; /* stability limit exceeded (ro) */
53 int :32; int :32; int :32; int :32;
54 int :32; int :32; int :32; int :32;
55 int :32; int :32; int :32; int :32;
58 #define TIMEVAL timeval32
59 #define TIMEX timex32
60 #define ADJTIME attribute_compat_text_section __adjtime_tv32
61 #define ADJTIMEX(x) INLINE_SYSCALL (old_adjtimex, 1, x)
62 #define ADJTIMEX32(x) INLINE_SYSCALL (old_adjtimex, 1, x)
64 #include <sysdeps/unix/sysv/linux/adjtime.c>
66 int attribute_compat_text_section
67 __adjtimex_tv32 (struct timex32 *tx) { return ADJTIMEX (tx); }
69 strong_alias (__adjtimex_tv32, __adjtimex_tv32_1);
70 strong_alias (__adjtimex_tv32, __adjtimex_tv32_2);
71 compat_symbol (libc, __adjtimex_tv32_1, __adjtimex, GLIBC_2_0);
72 compat_symbol (libc, __adjtimex_tv32_2, adjtimex, GLIBC_2_0);
73 compat_symbol (libc, __adjtime_tv32, adjtime, GLIBC_2_0);
74 #endif /* SHLIB_COMPAT */
76 #undef TIMEVAL
77 #undef TIMEX
78 #undef ADJTIME
79 #undef ADJTIMEX
80 #define TIMEVAL timeval
81 #define TIMEX timex
82 #define ADJTIMEX(x) INLINE_SYSCALL (adjtimex, 1, x)
84 #include <sysdeps/unix/sysv/linux/adjtime.c>
86 int
87 __adjtimex_tv64 (struct timex *tx) { return ADJTIMEX (tx); }
89 strong_alias (__adjtimex_tv64, __adjtimex_internal);
90 strong_alias (__adjtimex_tv64, __adjtimex_tv64p);
91 weak_alias (__adjtimex_tv64, ntp_adjtime);
92 versioned_symbol (libc, __adjtimex_tv64, __adjtimex, GLIBC_2_1);
93 versioned_symbol (libc, __adjtimex_tv64p, adjtimex, GLIBC_2_1);
94 versioned_symbol (libc, __adjtime, adjtime, GLIBC_2_1);