diff options
author | gfleury <gfleury@disroot.org> | 2024-11-26 22:53:28 +0200 |
---|---|---|
committer | Samuel Thibault <samuel.thibault@ens-lyon.org> | 2024-12-09 02:03:18 +0100 |
commit | 5ccb28e65da8380e2f6b0b8ed025c59c9713d863 (patch) | |
tree | 8102eeda5a19930f839d599dd8bcb458dfae0c24 | |
parent | ebd85cdc4ad93a7dfff17fcffaf84336fdd676ce (diff) | |
download | glibc-5ccb28e65da8380e2f6b0b8ed025c59c9713d863.zip glibc-5ccb28e65da8380e2f6b0b8ed025c59c9713d863.tar.gz glibc-5ccb28e65da8380e2f6b0b8ed025c59c9713d863.tar.bz2 |
htl: move pthread_condattr_setclock into libc.
Signed-off-by: gfleury <gfleury@disroot.org>
Message-ID: <20241126205329.2215295-7-gfleury@disroot.org>
-rw-r--r-- | htl/Makefile | 2 | ||||
-rw-r--r-- | htl/Versions | 4 | ||||
-rw-r--r-- | sysdeps/htl/pt-condattr-setclock.c | 10 | ||||
-rw-r--r-- | sysdeps/mach/hurd/i386/libc.abilist | 2 | ||||
-rw-r--r-- | sysdeps/mach/hurd/i386/libpthread.abilist | 1 | ||||
-rw-r--r-- | sysdeps/mach/hurd/x86_64/libc.abilist | 2 | ||||
-rw-r--r-- | sysdeps/mach/hurd/x86_64/libpthread.abilist | 1 |
7 files changed, 16 insertions, 6 deletions
diff --git a/htl/Makefile b/htl/Makefile index e68cf2b..56424ae 100644 --- a/htl/Makefile +++ b/htl/Makefile @@ -92,7 +92,6 @@ libpthread-routines := \ pt-rwlock-timedrdlock \ pt-rwlock-timedwrlock \ pt-rwlock-unlock \ - pt-condattr-setclock \ pt-condattr-setpshared \ pt-cond-destroy \ pt-cond-init \ @@ -206,6 +205,7 @@ routines := \ pt-condattr-getclock \ pt-condattr-getpshared \ pt-condattr-init \ + pt-condattr-setclock \ pt-getschedparam \ pt-nthreads \ pt-pthread_self \ diff --git a/htl/Versions b/htl/Versions index 95c8a52..533b871 100644 --- a/htl/Versions +++ b/htl/Versions @@ -30,6 +30,7 @@ libc { pthread_condattr_init; pthread_condattr_destroy; pthread_condattr_getpshared; + pthread_condattr_setclock; } GLIBC_2.21 { @@ -70,6 +71,7 @@ libc { pthread_attr_setguardsize; pthread_condattr_getclock; pthread_condattr_getpshared; + pthread_condattr_setclock; } @@ -127,7 +129,7 @@ libpthread { pthread_cond_broadcast; pthread_cond_destroy; pthread_cond_init; pthread_cond_signal; pthread_cond_timedwait; pthread_cond_wait; - pthread_condattr_setclock; pthread_condattr_setpshared; + pthread_condattr_setpshared; pthread_create; pthread_detach; pthread_exit; diff --git a/sysdeps/htl/pt-condattr-setclock.c b/sysdeps/htl/pt-condattr-setclock.c index d79cc58..3378764 100644 --- a/sysdeps/htl/pt-condattr-setclock.c +++ b/sysdeps/htl/pt-condattr-setclock.c @@ -17,10 +17,11 @@ <https://www.gnu.org/licenses/>. */ #include <pthread.h> +#include <shlib-compat.h> #include <pt-internal.h> int -pthread_condattr_setclock (pthread_condattr_t *attr, clockid_t clock) +__pthread_condattr_setclock (pthread_condattr_t *attr, clockid_t clock) { /* Only a few clocks are allowed. CLOCK_REALTIME is always allowed. CLOCK_MONOTONIC only if the kernel has the necessary support. */ @@ -34,7 +35,7 @@ pthread_condattr_setclock (pthread_condattr_t *attr, clockid_t clock) struct timespec ts; int res; - res = clock_gettime (CLOCK_MONOTONIC, &ts); + res = __clock_gettime (CLOCK_MONOTONIC, &ts); avail = res < 0 ? -1 : 1; } @@ -49,3 +50,8 @@ pthread_condattr_setclock (pthread_condattr_t *attr, clockid_t clock) return 0; } +versioned_symbol (libc, __pthread_condattr_setclock, pthread_condattr_setclock, GLIBC_2_41); + +#if OTHER_SHLIB_COMPAT (libpthread, GLIBC_2_12, GLIBC_2_41) +compat_symbol (libpthread, __pthread_condattr_setclock, pthread_condattr_setclock, GLIBC_2_12); +#endif diff --git a/sysdeps/mach/hurd/i386/libc.abilist b/sysdeps/mach/hurd/i386/libc.abilist index 1e3e648..a2cc574 100644 --- a/sysdeps/mach/hurd/i386/libc.abilist +++ b/sysdeps/mach/hurd/i386/libc.abilist @@ -53,6 +53,7 @@ GLIBC_2.12 pthread_condattr_destroy F GLIBC_2.12 pthread_condattr_getclock F GLIBC_2.12 pthread_condattr_getpshared F GLIBC_2.12 pthread_condattr_init F +GLIBC_2.12 pthread_condattr_setclock F GLIBC_2.12 pthread_equal F GLIBC_2.12 pthread_getschedparam F GLIBC_2.12 pthread_self F @@ -2509,6 +2510,7 @@ GLIBC_2.41 pthread_attr_setstackaddr F GLIBC_2.41 pthread_attr_setstacksize F GLIBC_2.41 pthread_condattr_getclock F GLIBC_2.41 pthread_condattr_getpshared F +GLIBC_2.41 pthread_condattr_setclock F GLIBC_2.5 __readlinkat_chk F GLIBC_2.5 inet6_opt_append F GLIBC_2.5 inet6_opt_find F diff --git a/sysdeps/mach/hurd/i386/libpthread.abilist b/sysdeps/mach/hurd/i386/libpthread.abilist index 6bacf9a..cd398f2 100644 --- a/sysdeps/mach/hurd/i386/libpthread.abilist +++ b/sysdeps/mach/hurd/i386/libpthread.abilist @@ -36,7 +36,6 @@ GLIBC_2.12 pthread_cond_init F GLIBC_2.12 pthread_cond_signal F GLIBC_2.12 pthread_cond_timedwait F GLIBC_2.12 pthread_cond_wait F -GLIBC_2.12 pthread_condattr_setclock F GLIBC_2.12 pthread_condattr_setpshared F GLIBC_2.12 pthread_create F GLIBC_2.12 pthread_detach F diff --git a/sysdeps/mach/hurd/x86_64/libc.abilist b/sysdeps/mach/hurd/x86_64/libc.abilist index 9a54905..2ff7027 100644 --- a/sysdeps/mach/hurd/x86_64/libc.abilist +++ b/sysdeps/mach/hurd/x86_64/libc.abilist @@ -1541,6 +1541,7 @@ GLIBC_2.38 pthread_condattr_destroy F GLIBC_2.38 pthread_condattr_getclock F GLIBC_2.38 pthread_condattr_getpshared F GLIBC_2.38 pthread_condattr_init F +GLIBC_2.38 pthread_condattr_setclock F GLIBC_2.38 pthread_equal F GLIBC_2.38 pthread_exit F GLIBC_2.38 pthread_getschedparam F @@ -2204,6 +2205,7 @@ GLIBC_2.41 pthread_attr_setstackaddr F GLIBC_2.41 pthread_attr_setstacksize F GLIBC_2.41 pthread_condattr_getclock F GLIBC_2.41 pthread_condattr_getpshared F +GLIBC_2.41 pthread_condattr_setclock F HURD_CTHREADS_0.3 __cthread_getspecific F HURD_CTHREADS_0.3 __cthread_keycreate F HURD_CTHREADS_0.3 __cthread_setspecific F diff --git a/sysdeps/mach/hurd/x86_64/libpthread.abilist b/sysdeps/mach/hurd/x86_64/libpthread.abilist index 35ff3d0..aa8f780 100644 --- a/sysdeps/mach/hurd/x86_64/libpthread.abilist +++ b/sysdeps/mach/hurd/x86_64/libpthread.abilist @@ -55,7 +55,6 @@ GLIBC_2.38 pthread_cond_init F GLIBC_2.38 pthread_cond_signal F GLIBC_2.38 pthread_cond_timedwait F GLIBC_2.38 pthread_cond_wait F -GLIBC_2.38 pthread_condattr_setclock F GLIBC_2.38 pthread_condattr_setpshared F GLIBC_2.38 pthread_create F GLIBC_2.38 pthread_detach F |