From 3a51fb604715776e051691c65e360bdf7d37488e Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Wed, 14 May 2014 10:35:39 -0700 Subject: Move x86_64 timer_*.c out of nptl/ --- ChangeLog | 33 +++++++++++ .../sysv/linux/powerpc/powerpc64/timer_create.c | 2 +- .../sysv/linux/powerpc/powerpc64/timer_delete.c | 2 +- .../sysv/linux/powerpc/powerpc64/timer_getoverr.c | 2 +- .../sysv/linux/powerpc/powerpc64/timer_gettime.c | 2 +- .../sysv/linux/powerpc/powerpc64/timer_settime.c | 2 +- .../unix/sysv/linux/sparc/sparc64/timer_create.c | 2 +- .../unix/sysv/linux/sparc/sparc64/timer_delete.c | 2 +- .../unix/sysv/linux/sparc/sparc64/timer_getoverr.c | 2 +- .../unix/sysv/linux/sparc/sparc64/timer_gettime.c | 2 +- .../unix/sysv/linux/sparc/sparc64/timer_settime.c | 2 +- nptl/sysdeps/unix/sysv/linux/x86_64/Versions | 7 --- nptl/sysdeps/unix/sysv/linux/x86_64/timer_create.c | 65 ---------------------- nptl/sysdeps/unix/sysv/linux/x86_64/timer_delete.c | 44 --------------- .../unix/sysv/linux/x86_64/timer_getoverr.c | 38 ------------- .../sysdeps/unix/sysv/linux/x86_64/timer_gettime.c | 37 ------------ .../sysdeps/unix/sysv/linux/x86_64/timer_settime.c | 39 ------------- sysdeps/unix/sysv/linux/x86_64/Versions | 8 +++ sysdeps/unix/sysv/linux/x86_64/timer_create.c | 65 ++++++++++++++++++++++ sysdeps/unix/sysv/linux/x86_64/timer_delete.c | 44 +++++++++++++++ sysdeps/unix/sysv/linux/x86_64/timer_getoverr.c | 38 +++++++++++++ sysdeps/unix/sysv/linux/x86_64/timer_gettime.c | 37 ++++++++++++ sysdeps/unix/sysv/linux/x86_64/timer_settime.c | 39 +++++++++++++ 23 files changed, 274 insertions(+), 240 deletions(-) delete mode 100644 nptl/sysdeps/unix/sysv/linux/x86_64/Versions delete mode 100644 nptl/sysdeps/unix/sysv/linux/x86_64/timer_create.c delete mode 100644 nptl/sysdeps/unix/sysv/linux/x86_64/timer_delete.c delete mode 100644 nptl/sysdeps/unix/sysv/linux/x86_64/timer_getoverr.c delete mode 100644 nptl/sysdeps/unix/sysv/linux/x86_64/timer_gettime.c delete mode 100644 nptl/sysdeps/unix/sysv/linux/x86_64/timer_settime.c create mode 100644 sysdeps/unix/sysv/linux/x86_64/timer_create.c create mode 100644 sysdeps/unix/sysv/linux/x86_64/timer_delete.c create mode 100644 sysdeps/unix/sysv/linux/x86_64/timer_getoverr.c create mode 100644 sysdeps/unix/sysv/linux/x86_64/timer_gettime.c create mode 100644 sysdeps/unix/sysv/linux/x86_64/timer_settime.c diff --git a/ChangeLog b/ChangeLog index f38e8b7509..9b48373286 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,38 @@ 2014-05-14 Roland McGrath + * nptl/sysdeps/unix/sysv/linux/x86_64/Versions: Remove, merge into ... + * sysdeps/unix/sysv/linux/x86_64/Versions: ... here. + * nptl/sysdeps/unix/sysv/linux/x86_64/timer_create.c: Moved ... + * sysdeps/unix/sysv/linux/x86_64/timer_create.c: here. + * nptl/sysdeps/unix/sysv/linux/x86_64/timer_delete.c: Moved ... + * sysdeps/unix/sysv/linux/x86_64/timer_delete.c: ... here + * nptl/sysdeps/unix/sysv/linux/x86_64/timer_getoverr.c: Moved ... + * sysdeps/unix/sysv/linux/x86_64/timer_getoverr.c: ... here + * nptl/sysdeps/unix/sysv/linux/x86_64/timer_gettime.c: Moved ... + * sysdeps/unix/sysv/linux/x86_64/timer_gettime.c: ... here + * nptl/sysdeps/unix/sysv/linux/x86_64/timer_settime.c: Moved ... + * sysdeps/unix/sysv/linux/x86_64/timer_settime.c: ... here + * nptl/sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_create.c: + Update #include. + * nptl/sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_delete.c: + Likewise. + * nptl/sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_getoverr.c: + Likewise. + * nptl/sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_gettime.c: + Likewise. + * nptl/sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_settime.c: + Likewise. + * nptl/sysdeps/unix/sysv/linux/sparc/sparc64/timer_create.c: + Likewise. + * nptl/sysdeps/unix/sysv/linux/sparc/sparc64/timer_delete.c: + Likewise. + * nptl/sysdeps/unix/sysv/linux/sparc/sparc64/timer_getoverr.c: + Likewise. + * nptl/sysdeps/unix/sysv/linux/sparc/sparc64/timer_gettime.c: + Likewise. + * nptl/sysdeps/unix/sysv/linux/sparc/sparc64/timer_settime.c: + Likewise. + * sysdeps/unix/sysv/linux/x86_64/clone.S: Deconditionalize the code that was previously under [RESET_PID]. * sysdeps/unix/sysv/linux/i386/clone.S: Likewise. diff --git a/nptl/sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_create.c b/nptl/sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_create.c index 172223af3f..d307135003 100644 --- a/nptl/sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_create.c +++ b/nptl/sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_create.c @@ -1 +1 @@ -#include "../x86_64/timer_create.c" +#include diff --git a/nptl/sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_delete.c b/nptl/sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_delete.c index 537516e0aa..2dd94f5c7a 100644 --- a/nptl/sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_delete.c +++ b/nptl/sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_delete.c @@ -1 +1 @@ -#include "../x86_64/timer_delete.c" +#include diff --git a/nptl/sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_getoverr.c b/nptl/sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_getoverr.c index 3f21a73c98..22eaff5cda 100644 --- a/nptl/sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_getoverr.c +++ b/nptl/sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_getoverr.c @@ -1 +1 @@ -#include "../x86_64/timer_getoverr.c" +#include diff --git a/nptl/sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_gettime.c b/nptl/sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_gettime.c index a50143adc5..cea524bae5 100644 --- a/nptl/sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_gettime.c +++ b/nptl/sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_gettime.c @@ -1 +1 @@ -#include "../x86_64/timer_gettime.c" +#include diff --git a/nptl/sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_settime.c b/nptl/sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_settime.c index 37baeffacc..fa231149d5 100644 --- a/nptl/sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_settime.c +++ b/nptl/sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_settime.c @@ -1 +1 @@ -#include "../x86_64/timer_settime.c" +#include diff --git a/nptl/sysdeps/unix/sysv/linux/sparc/sparc64/timer_create.c b/nptl/sysdeps/unix/sysv/linux/sparc/sparc64/timer_create.c index 0a9c3372b8..d307135003 100644 --- a/nptl/sysdeps/unix/sysv/linux/sparc/sparc64/timer_create.c +++ b/nptl/sysdeps/unix/sysv/linux/sparc/sparc64/timer_create.c @@ -1 +1 @@ -#include "../../x86_64/timer_create.c" +#include diff --git a/nptl/sysdeps/unix/sysv/linux/sparc/sparc64/timer_delete.c b/nptl/sysdeps/unix/sysv/linux/sparc/sparc64/timer_delete.c index f0d4fd21d6..2dd94f5c7a 100644 --- a/nptl/sysdeps/unix/sysv/linux/sparc/sparc64/timer_delete.c +++ b/nptl/sysdeps/unix/sysv/linux/sparc/sparc64/timer_delete.c @@ -1 +1 @@ -#include "../../x86_64/timer_delete.c" +#include diff --git a/nptl/sysdeps/unix/sysv/linux/sparc/sparc64/timer_getoverr.c b/nptl/sysdeps/unix/sysv/linux/sparc/sparc64/timer_getoverr.c index 82121a7a28..22eaff5cda 100644 --- a/nptl/sysdeps/unix/sysv/linux/sparc/sparc64/timer_getoverr.c +++ b/nptl/sysdeps/unix/sysv/linux/sparc/sparc64/timer_getoverr.c @@ -1 +1 @@ -#include "../../x86_64/timer_getoverr.c" +#include diff --git a/nptl/sysdeps/unix/sysv/linux/sparc/sparc64/timer_gettime.c b/nptl/sysdeps/unix/sysv/linux/sparc/sparc64/timer_gettime.c index 313c05feac..cea524bae5 100644 --- a/nptl/sysdeps/unix/sysv/linux/sparc/sparc64/timer_gettime.c +++ b/nptl/sysdeps/unix/sysv/linux/sparc/sparc64/timer_gettime.c @@ -1 +1 @@ -#include "../../x86_64/timer_gettime.c" +#include diff --git a/nptl/sysdeps/unix/sysv/linux/sparc/sparc64/timer_settime.c b/nptl/sysdeps/unix/sysv/linux/sparc/sparc64/timer_settime.c index 76f549cb47..fa231149d5 100644 --- a/nptl/sysdeps/unix/sysv/linux/sparc/sparc64/timer_settime.c +++ b/nptl/sysdeps/unix/sysv/linux/sparc/sparc64/timer_settime.c @@ -1 +1 @@ -#include "../../x86_64/timer_settime.c" +#include diff --git a/nptl/sysdeps/unix/sysv/linux/x86_64/Versions b/nptl/sysdeps/unix/sysv/linux/x86_64/Versions deleted file mode 100644 index 3b111ddb51..0000000000 --- a/nptl/sysdeps/unix/sysv/linux/x86_64/Versions +++ /dev/null @@ -1,7 +0,0 @@ -librt { - GLIBC_2.3.3 { - # Changed timer_t. - timer_create; timer_delete; timer_getoverrun; timer_gettime; - timer_settime; - } -} diff --git a/nptl/sysdeps/unix/sysv/linux/x86_64/timer_create.c b/nptl/sysdeps/unix/sysv/linux/x86_64/timer_create.c deleted file mode 100644 index 7624f2cdb2..0000000000 --- a/nptl/sysdeps/unix/sysv/linux/x86_64/timer_create.c +++ /dev/null @@ -1,65 +0,0 @@ -/* Copyright (C) 2003-2014 Free Software Foundation, Inc. - This file is part of the GNU C Library. - Contributed by Ulrich Drepper , 2003. - - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public License as - published by the Free Software Foundation; either version 2.1 of the - License, or (at your option) any later version. - - The GNU C Library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library; see the file COPYING.LIB. If - not, see . */ - -#include -#include "compat-timer.h" -#include - - -#define timer_create_alias __timer_create_new -#include "../timer_create.c" - -#undef timer_create -versioned_symbol (librt, __timer_create_new, timer_create, GLIBC_2_3_3); - - -#if SHLIB_COMPAT (librt, GLIBC_2_2, GLIBC_2_3_3) -timer_t __compat_timer_list[OLD_TIMER_MAX] attribute_hidden; - - -int -__timer_create_old (clockid_t clock_id, struct sigevent *evp, int *timerid) -{ - timer_t newp; - - int res = __timer_create_new (clock_id, evp, &newp); - if (res == 0) - { - int i; - for (i = 0; i < OLD_TIMER_MAX; ++i) - if (__compat_timer_list[i] == NULL - && ! atomic_compare_and_exchange_bool_acq (&__compat_timer_list[i], - newp, NULL)) - { - *timerid = i; - break; - } - - if (__glibc_unlikely (i == OLD_TIMER_MAX)) - { - /* No free slot. */ - (void) __timer_delete_new (newp); - __set_errno (EINVAL); - res = -1; - } - } - - return res; -} -compat_symbol (librt, __timer_create_old, timer_create, GLIBC_2_2); -#endif diff --git a/nptl/sysdeps/unix/sysv/linux/x86_64/timer_delete.c b/nptl/sysdeps/unix/sysv/linux/x86_64/timer_delete.c deleted file mode 100644 index c92da1af35..0000000000 --- a/nptl/sysdeps/unix/sysv/linux/x86_64/timer_delete.c +++ /dev/null @@ -1,44 +0,0 @@ -/* Copyright (C) 2003-2014 Free Software Foundation, Inc. - This file is part of the GNU C Library. - Contributed by Ulrich Drepper , 2003. - - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public License as - published by the Free Software Foundation; either version 2.1 of the - License, or (at your option) any later version. - - The GNU C Library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library; see the file COPYING.LIB. If - not, see . */ - -#include -#include "compat-timer.h" - - -#define timer_delete_alias __timer_delete_new -#include "../timer_delete.c" - -#undef timer_delete -versioned_symbol (librt, __timer_delete_new, timer_delete, GLIBC_2_3_3); - - -#if SHLIB_COMPAT (librt, GLIBC_2_2, GLIBC_2_3_3) -int -__timer_delete_old (int timerid) -{ - int res = __timer_delete_new (__compat_timer_list[timerid]); - - if (res == 0) - /* Successful timer deletion, now free the index. We only need to - store a word and that better be atomic. */ - __compat_timer_list[timerid] = NULL; - - return res; -} -compat_symbol (librt, __timer_delete_old, timer_delete, GLIBC_2_2); -#endif diff --git a/nptl/sysdeps/unix/sysv/linux/x86_64/timer_getoverr.c b/nptl/sysdeps/unix/sysv/linux/x86_64/timer_getoverr.c deleted file mode 100644 index 66d927c56a..0000000000 --- a/nptl/sysdeps/unix/sysv/linux/x86_64/timer_getoverr.c +++ /dev/null @@ -1,38 +0,0 @@ -/* Copyright (C) 2003-2014 Free Software Foundation, Inc. - This file is part of the GNU C Library. - Contributed by Ulrich Drepper , 2003. - - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public License as - published by the Free Software Foundation; either version 2.1 of the - License, or (at your option) any later version. - - The GNU C Library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library; see the file COPYING.LIB. If - not, see . */ - -#include -#include "compat-timer.h" - - -#define timer_getoverrun_alias __timer_getoverrun_new -#include "../timer_getoverr.c" - -#undef timer_getoverrun -versioned_symbol (librt, __timer_getoverrun_new, timer_getoverrun, - GLIBC_2_3_3); - - -#if SHLIB_COMPAT (librt, GLIBC_2_2, GLIBC_2_3_3) -int -__timer_getoverrun_old (int timerid) -{ - return __timer_getoverrun_new (__compat_timer_list[timerid]); -} -compat_symbol (librt, __timer_getoverrun_old, timer_getoverrun, GLIBC_2_2); -#endif diff --git a/nptl/sysdeps/unix/sysv/linux/x86_64/timer_gettime.c b/nptl/sysdeps/unix/sysv/linux/x86_64/timer_gettime.c deleted file mode 100644 index 439d553d71..0000000000 --- a/nptl/sysdeps/unix/sysv/linux/x86_64/timer_gettime.c +++ /dev/null @@ -1,37 +0,0 @@ -/* Copyright (C) 2003-2014 Free Software Foundation, Inc. - This file is part of the GNU C Library. - Contributed by Ulrich Drepper , 2003. - - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public License as - published by the Free Software Foundation; either version 2.1 of the - License, or (at your option) any later version. - - The GNU C Library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library; see the file COPYING.LIB. If - not, see . */ - -#include -#include "compat-timer.h" - - -#define timer_gettime_alias __timer_gettime_new -#include "../timer_gettime.c" - -#undef timer_gettime -versioned_symbol (librt, __timer_gettime_new, timer_gettime, GLIBC_2_3_3); - - -#if SHLIB_COMPAT (librt, GLIBC_2_2, GLIBC_2_3_3) -int -__timer_gettime_old (int timerid, struct itimerspec *value) -{ - return __timer_gettime_new (__compat_timer_list[timerid], value); -} -compat_symbol (librt, __timer_gettime_old, timer_gettime, GLIBC_2_2); -#endif diff --git a/nptl/sysdeps/unix/sysv/linux/x86_64/timer_settime.c b/nptl/sysdeps/unix/sysv/linux/x86_64/timer_settime.c deleted file mode 100644 index f8a8664840..0000000000 --- a/nptl/sysdeps/unix/sysv/linux/x86_64/timer_settime.c +++ /dev/null @@ -1,39 +0,0 @@ -/* Copyright (C) 2003-2014 Free Software Foundation, Inc. - This file is part of the GNU C Library. - Contributed by Ulrich Drepper , 2003. - - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public License as - published by the Free Software Foundation; either version 2.1 of the - License, or (at your option) any later version. - - The GNU C Library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library; see the file COPYING.LIB. If - not, see . */ - -#include -#include "compat-timer.h" - - -#define timer_settime_alias __timer_settime_new -#include "../timer_settime.c" - -#undef timer_settime -versioned_symbol (librt, __timer_settime_new, timer_settime, GLIBC_2_3_3); - - -#if SHLIB_COMPAT (librt, GLIBC_2_2, GLIBC_2_3_3) -int -__timer_settime_old (int timerid, int flags, const struct itimerspec *value, - struct itimerspec *ovalue) -{ - return __timer_settime_new (__compat_timer_list[timerid], flags, - value, ovalue); -} -compat_symbol (librt, __timer_settime_old, timer_settime, GLIBC_2_2); -#endif diff --git a/sysdeps/unix/sysv/linux/x86_64/Versions b/sysdeps/unix/sysv/linux/x86_64/Versions index 34c100bfd2..4ce7b78af4 100644 --- a/sysdeps/unix/sysv/linux/x86_64/Versions +++ b/sysdeps/unix/sysv/linux/x86_64/Versions @@ -10,3 +10,11 @@ libc { __vdso_clock_gettime; } } + +librt { + GLIBC_2.3.3 { + # Changed timer_t. + timer_create; timer_delete; timer_getoverrun; timer_gettime; + timer_settime; + } +} diff --git a/sysdeps/unix/sysv/linux/x86_64/timer_create.c b/sysdeps/unix/sysv/linux/x86_64/timer_create.c new file mode 100644 index 0000000000..a1209f9f0b --- /dev/null +++ b/sysdeps/unix/sysv/linux/x86_64/timer_create.c @@ -0,0 +1,65 @@ +/* Copyright (C) 2003-2014 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Ulrich Drepper , 2003. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public License as + published by the Free Software Foundation; either version 2.1 of the + License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; see the file COPYING.LIB. If + not, see . */ + +#include +#include "compat-timer.h" +#include + + +#define timer_create_alias __timer_create_new +#include + +#undef timer_create +versioned_symbol (librt, __timer_create_new, timer_create, GLIBC_2_3_3); + + +#if SHLIB_COMPAT (librt, GLIBC_2_2, GLIBC_2_3_3) +timer_t __compat_timer_list[OLD_TIMER_MAX] attribute_hidden; + + +int +__timer_create_old (clockid_t clock_id, struct sigevent *evp, int *timerid) +{ + timer_t newp; + + int res = __timer_create_new (clock_id, evp, &newp); + if (res == 0) + { + int i; + for (i = 0; i < OLD_TIMER_MAX; ++i) + if (__compat_timer_list[i] == NULL + && ! atomic_compare_and_exchange_bool_acq (&__compat_timer_list[i], + newp, NULL)) + { + *timerid = i; + break; + } + + if (__glibc_unlikely (i == OLD_TIMER_MAX)) + { + /* No free slot. */ + (void) __timer_delete_new (newp); + __set_errno (EINVAL); + res = -1; + } + } + + return res; +} +compat_symbol (librt, __timer_create_old, timer_create, GLIBC_2_2); +#endif diff --git a/sysdeps/unix/sysv/linux/x86_64/timer_delete.c b/sysdeps/unix/sysv/linux/x86_64/timer_delete.c new file mode 100644 index 0000000000..25861b7e9e --- /dev/null +++ b/sysdeps/unix/sysv/linux/x86_64/timer_delete.c @@ -0,0 +1,44 @@ +/* Copyright (C) 2003-2014 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Ulrich Drepper , 2003. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public License as + published by the Free Software Foundation; either version 2.1 of the + License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; see the file COPYING.LIB. If + not, see . */ + +#include +#include "compat-timer.h" + + +#define timer_delete_alias __timer_delete_new +#include + +#undef timer_delete +versioned_symbol (librt, __timer_delete_new, timer_delete, GLIBC_2_3_3); + + +#if SHLIB_COMPAT (librt, GLIBC_2_2, GLIBC_2_3_3) +int +__timer_delete_old (int timerid) +{ + int res = __timer_delete_new (__compat_timer_list[timerid]); + + if (res == 0) + /* Successful timer deletion, now free the index. We only need to + store a word and that better be atomic. */ + __compat_timer_list[timerid] = NULL; + + return res; +} +compat_symbol (librt, __timer_delete_old, timer_delete, GLIBC_2_2); +#endif diff --git a/sysdeps/unix/sysv/linux/x86_64/timer_getoverr.c b/sysdeps/unix/sysv/linux/x86_64/timer_getoverr.c new file mode 100644 index 0000000000..7f45000080 --- /dev/null +++ b/sysdeps/unix/sysv/linux/x86_64/timer_getoverr.c @@ -0,0 +1,38 @@ +/* Copyright (C) 2003-2014 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Ulrich Drepper , 2003. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public License as + published by the Free Software Foundation; either version 2.1 of the + License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; see the file COPYING.LIB. If + not, see . */ + +#include +#include "compat-timer.h" + + +#define timer_getoverrun_alias __timer_getoverrun_new +#include + +#undef timer_getoverrun +versioned_symbol (librt, __timer_getoverrun_new, timer_getoverrun, + GLIBC_2_3_3); + + +#if SHLIB_COMPAT (librt, GLIBC_2_2, GLIBC_2_3_3) +int +__timer_getoverrun_old (int timerid) +{ + return __timer_getoverrun_new (__compat_timer_list[timerid]); +} +compat_symbol (librt, __timer_getoverrun_old, timer_getoverrun, GLIBC_2_2); +#endif diff --git a/sysdeps/unix/sysv/linux/x86_64/timer_gettime.c b/sysdeps/unix/sysv/linux/x86_64/timer_gettime.c new file mode 100644 index 0000000000..7df4804fdf --- /dev/null +++ b/sysdeps/unix/sysv/linux/x86_64/timer_gettime.c @@ -0,0 +1,37 @@ +/* Copyright (C) 2003-2014 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Ulrich Drepper , 2003. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public License as + published by the Free Software Foundation; either version 2.1 of the + License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; see the file COPYING.LIB. If + not, see . */ + +#include +#include "compat-timer.h" + + +#define timer_gettime_alias __timer_gettime_new +#include + +#undef timer_gettime +versioned_symbol (librt, __timer_gettime_new, timer_gettime, GLIBC_2_3_3); + + +#if SHLIB_COMPAT (librt, GLIBC_2_2, GLIBC_2_3_3) +int +__timer_gettime_old (int timerid, struct itimerspec *value) +{ + return __timer_gettime_new (__compat_timer_list[timerid], value); +} +compat_symbol (librt, __timer_gettime_old, timer_gettime, GLIBC_2_2); +#endif diff --git a/sysdeps/unix/sysv/linux/x86_64/timer_settime.c b/sysdeps/unix/sysv/linux/x86_64/timer_settime.c new file mode 100644 index 0000000000..399ff835b0 --- /dev/null +++ b/sysdeps/unix/sysv/linux/x86_64/timer_settime.c @@ -0,0 +1,39 @@ +/* Copyright (C) 2003-2014 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Ulrich Drepper , 2003. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public License as + published by the Free Software Foundation; either version 2.1 of the + License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; see the file COPYING.LIB. If + not, see . */ + +#include +#include "compat-timer.h" + + +#define timer_settime_alias __timer_settime_new +#include + +#undef timer_settime +versioned_symbol (librt, __timer_settime_new, timer_settime, GLIBC_2_3_3); + + +#if SHLIB_COMPAT (librt, GLIBC_2_2, GLIBC_2_3_3) +int +__timer_settime_old (int timerid, int flags, const struct itimerspec *value, + struct itimerspec *ovalue) +{ + return __timer_settime_new (__compat_timer_list[timerid], flags, + value, ovalue); +} +compat_symbol (librt, __timer_settime_old, timer_settime, GLIBC_2_2); +#endif -- cgit 1.4.1