| 1 | /* Copyright (C) 2003-2023 Free Software Foundation, Inc. |
| 2 | This file is part of the GNU C Library. |
| 3 | |
| 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 License as |
| 6 | published by the Free Software Foundation; either version 2.1 of the |
| 7 | License, or (at your option) any later version. |
| 8 | |
| 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. |
| 13 | |
| 14 | You should have received a copy of the GNU Lesser General Public |
| 15 | License along with the GNU C Library; see the file COPYING.LIB. If |
| 16 | not, see <https://www.gnu.org/licenses/>. */ |
| 17 | |
| 18 | #include <errno.h> |
| 19 | #include <time.h> |
| 20 | #include <sysdep.h> |
| 21 | #include "kernel-posix-timers.h" |
| 22 | #include <shlib-compat.h> |
| 23 | |
| 24 | int |
| 25 | ___timer_getoverrun (timer_t timerid) |
| 26 | { |
| 27 | kernel_timer_t ktimerid = timerid_to_kernel_timer (timerid); |
| 28 | return INLINE_SYSCALL_CALL (timer_getoverrun, ktimerid); |
| 29 | } |
| 30 | versioned_symbol (libc, ___timer_getoverrun, timer_getoverrun, GLIBC_2_34); |
| 31 | libc_hidden_ver (___timer_getoverrun, __timer_getoverrun) |
| 32 | |
| 33 | #if TIMER_T_WAS_INT_COMPAT |
| 34 | # if OTHER_SHLIB_COMPAT (librt, GLIBC_2_3_3, GLIBC_2_34) |
| 35 | compat_symbol (librt, ___timer_getoverrun, timer_getoverrun, GLIBC_2_3_3); |
| 36 | # endif |
| 37 | |
| 38 | # if OTHER_SHLIB_COMPAT (librt, GLIBC_2_2, GLIBC_2_3_3) |
| 39 | int |
| 40 | __timer_getoverrun_old (int timerid) |
| 41 | { |
| 42 | return __timer_getoverrun (__timer_compat_list[timerid]); |
| 43 | } |
| 44 | compat_symbol (librt, __timer_getoverrun_old, timer_getoverrun, GLIBC_2_2); |
| 45 | # endif /* OTHER_SHLIB_COMPAT */ |
| 46 | |
| 47 | #else /* !TIMER_T_WAS_INT_COMPAT */ |
| 48 | # if OTHER_SHLIB_COMPAT (librt, GLIBC_2_2, GLIBC_2_34) |
| 49 | compat_symbol (librt, ___timer_getoverrun, timer_getoverrun, GLIBC_2_2); |
| 50 | # endif |
| 51 | #endif /* !TIMER_T_WAS_INT_COMPAT */ |
| 52 | |