diff options
author | gfleury <gfleury@disroot.org> | 2024-12-31 15:49:08 +0200 |
---|---|---|
committer | Samuel Thibault <samuel.thibault@ens-lyon.org> | 2025-01-02 01:20:20 +0100 |
commit | 4371b11c86d160091ccdb56b974d24f41a5c0958 (patch) | |
tree | 54064f318816216141498ca3c85155d5bc713f5f /sysdeps/mach | |
parent | 1e5b39a5e05c82eb2eef38b1982c756e2237cd90 (diff) | |
download | glibc-4371b11c86d160091ccdb56b974d24f41a5c0958.zip glibc-4371b11c86d160091ccdb56b974d24f41a5c0958.tar.gz glibc-4371b11c86d160091ccdb56b974d24f41a5c0958.tar.bz2 |
htl: move pthread_mutexattr_{setrobust, setrobust_np}, pthread_mutexattr_{getrobust, getrobust_np} into libc.
Message-ID: <20241231134909.1166440-8-gfleury@disroot.org>
Diffstat (limited to 'sysdeps/mach')
-rw-r--r-- | sysdeps/mach/hurd/htl/pt-mutexattr-getrobust.c | 13 | ||||
-rw-r--r-- | sysdeps/mach/hurd/htl/pt-mutexattr-setrobust.c | 13 | ||||
-rw-r--r-- | sysdeps/mach/hurd/i386/libc.abilist | 8 | ||||
-rw-r--r-- | sysdeps/mach/hurd/i386/libpthread.abilist | 4 | ||||
-rw-r--r-- | sysdeps/mach/hurd/x86_64/libc.abilist | 8 | ||||
-rw-r--r-- | sysdeps/mach/hurd/x86_64/libpthread.abilist | 4 |
6 files changed, 36 insertions, 14 deletions
diff --git a/sysdeps/mach/hurd/htl/pt-mutexattr-getrobust.c b/sysdeps/mach/hurd/htl/pt-mutexattr-getrobust.c index fa14b88..6915ac7 100644 --- a/sysdeps/mach/hurd/htl/pt-mutexattr-getrobust.c +++ b/sysdeps/mach/hurd/htl/pt-mutexattr-getrobust.c @@ -16,19 +16,26 @@ License along with the GNU C Library; if not, see <https://www.gnu.org/licenses/>. */ -#include <pthread.h> +#include <pthreadP.h> #include <stdlib.h> #include <assert.h> #include <pt-internal.h> #include "pt-mutex.h" #include <hurdlock.h> +#include <shlib-compat.h> int -pthread_mutexattr_getrobust (const pthread_mutexattr_t *attrp, int *outp) +__pthread_mutexattr_getrobust (const pthread_mutexattr_t *attrp, int *outp) { *outp = ((attrp->__prioceiling & PTHREAD_MUTEX_ROBUST) ? PTHREAD_MUTEX_ROBUST : PTHREAD_MUTEX_STALLED); return 0; } +libc_hidden_def (__pthread_mutexattr_getrobust) +versioned_symbol (libc, __pthread_mutexattr_getrobust, pthread_mutexattr_getrobust, GLIBC_2_41); +versioned_symbol (libc, __pthread_mutexattr_getrobust, pthread_mutexattr_getrobust_np, GLIBC_2_41); -weak_alias (pthread_mutexattr_getrobust, pthread_mutexattr_getrobust_np) +#if OTHER_SHLIB_COMPAT (libpthread, GLIBC_2_32, GLIBC_2_41) +compat_symbol (libpthread, __pthread_mutexattr_getrobust,pthread_mutexattr_getrobust, GLIBC_2_32); +compat_symbol (libpthread, __pthread_mutexattr_getrobust,pthread_mutexattr_getrobust_np, GLIBC_2_32); +#endif diff --git a/sysdeps/mach/hurd/htl/pt-mutexattr-setrobust.c b/sysdeps/mach/hurd/htl/pt-mutexattr-setrobust.c index 6bba0df..8d90814 100644 --- a/sysdeps/mach/hurd/htl/pt-mutexattr-setrobust.c +++ b/sysdeps/mach/hurd/htl/pt-mutexattr-setrobust.c @@ -16,15 +16,16 @@ License along with the GNU C Library; if not, see <https://www.gnu.org/licenses/>. */ -#include <pthread.h> +#include <pthreadP.h> #include <stdlib.h> #include <assert.h> #include <pt-internal.h> #include "pt-mutex.h" #include <hurdlock.h> +#include <shlib-compat.h> int -pthread_mutexattr_setrobust (pthread_mutexattr_t *attrp, int robust) +__pthread_mutexattr_setrobust (pthread_mutexattr_t *attrp, int robust) { if (robust != PTHREAD_MUTEX_ROBUST && robust != PTHREAD_MUTEX_STALLED) return EINVAL; @@ -32,5 +33,11 @@ pthread_mutexattr_setrobust (pthread_mutexattr_t *attrp, int robust) attrp->__prioceiling |= robust; return 0; } +libc_hidden_def (__pthread_mutexattr_setrobust) +versioned_symbol (libc, __pthread_mutexattr_setrobust, pthread_mutexattr_setrobust, GLIBC_2_41); +versioned_symbol (libc, __pthread_mutexattr_setrobust, pthread_mutexattr_setrobust_np, GLIBC_2_41); -weak_alias (pthread_mutexattr_setrobust, pthread_mutexattr_setrobust_np) +#if OTHER_SHLIB_COMPAT (libpthread, GLIBC_2_32, GLIBC_2_41) +compat_symbol (libpthread, __pthread_mutexattr_setrobust,pthread_mutexattr_setrobust, GLIBC_2_32); +compat_symbol (libpthread, __pthread_mutexattr_setrobust,pthread_mutexattr_setrobust_np, GLIBC_2_32); +#endif diff --git a/sysdeps/mach/hurd/i386/libc.abilist b/sysdeps/mach/hurd/i386/libc.abilist index 45147ca..8e364b1 100644 --- a/sysdeps/mach/hurd/i386/libc.abilist +++ b/sysdeps/mach/hurd/i386/libc.abilist @@ -2261,6 +2261,10 @@ GLIBC_2.32 __libc_single_threaded D 0x1 GLIBC_2.32 mach_print F GLIBC_2.32 mremap F GLIBC_2.32 pthread_cond_clockwait F +GLIBC_2.32 pthread_mutexattr_getrobust F +GLIBC_2.32 pthread_mutexattr_getrobust_np F +GLIBC_2.32 pthread_mutexattr_setrobust F +GLIBC_2.32 pthread_mutexattr_setrobust_np F GLIBC_2.32 sigabbrev_np F GLIBC_2.32 sigdescr_np F GLIBC_2.32 strerrordesc_np F @@ -2531,9 +2535,13 @@ GLIBC_2.41 pthread_condattr_setclock F GLIBC_2.41 pthread_condattr_setpshared F GLIBC_2.41 pthread_mutexattr_getprotocol F GLIBC_2.41 pthread_mutexattr_getpshared F +GLIBC_2.41 pthread_mutexattr_getrobust F +GLIBC_2.41 pthread_mutexattr_getrobust_np F GLIBC_2.41 pthread_mutexattr_gettype F GLIBC_2.41 pthread_mutexattr_setprotocol F GLIBC_2.41 pthread_mutexattr_setpshared F +GLIBC_2.41 pthread_mutexattr_setrobust F +GLIBC_2.41 pthread_mutexattr_setrobust_np F GLIBC_2.41 pthread_mutexattr_settype F GLIBC_2.41 pthread_sigmask F GLIBC_2.5 __readlinkat_chk F diff --git a/sysdeps/mach/hurd/i386/libpthread.abilist b/sysdeps/mach/hurd/i386/libpthread.abilist index cf6b71a..bc48c00 100644 --- a/sysdeps/mach/hurd/i386/libpthread.abilist +++ b/sysdeps/mach/hurd/i386/libpthread.abilist @@ -112,10 +112,6 @@ GLIBC_2.32 pthread_clockjoin_np F GLIBC_2.32 pthread_mutex_clocklock F GLIBC_2.32 pthread_mutex_consistent F GLIBC_2.32 pthread_mutex_consistent_np F -GLIBC_2.32 pthread_mutexattr_getrobust F -GLIBC_2.32 pthread_mutexattr_getrobust_np F -GLIBC_2.32 pthread_mutexattr_setrobust F -GLIBC_2.32 pthread_mutexattr_setrobust_np F GLIBC_2.32 pthread_rwlock_clockrdlock F GLIBC_2.32 pthread_rwlock_clockwrlock F GLIBC_2.32 pthread_timedjoin_np F diff --git a/sysdeps/mach/hurd/x86_64/libc.abilist b/sysdeps/mach/hurd/x86_64/libc.abilist index 0e9ff2d..05a4a8c 100644 --- a/sysdeps/mach/hurd/x86_64/libc.abilist +++ b/sysdeps/mach/hurd/x86_64/libc.abilist @@ -1554,10 +1554,14 @@ GLIBC_2.38 pthread_mutex_unlock F GLIBC_2.38 pthread_mutexattr_destroy F GLIBC_2.38 pthread_mutexattr_getprotocol F GLIBC_2.38 pthread_mutexattr_getpshared F +GLIBC_2.38 pthread_mutexattr_getrobust F +GLIBC_2.38 pthread_mutexattr_getrobust_np F GLIBC_2.38 pthread_mutexattr_gettype F GLIBC_2.38 pthread_mutexattr_init F GLIBC_2.38 pthread_mutexattr_setprotocol F GLIBC_2.38 pthread_mutexattr_setpshared F +GLIBC_2.38 pthread_mutexattr_setrobust F +GLIBC_2.38 pthread_mutexattr_setrobust_np F GLIBC_2.38 pthread_mutexattr_settype F GLIBC_2.38 pthread_self F GLIBC_2.38 pthread_setcancelstate F @@ -2220,9 +2224,13 @@ GLIBC_2.41 pthread_condattr_setclock F GLIBC_2.41 pthread_condattr_setpshared F GLIBC_2.41 pthread_mutexattr_getprotocol F GLIBC_2.41 pthread_mutexattr_getpshared F +GLIBC_2.41 pthread_mutexattr_getrobust F +GLIBC_2.41 pthread_mutexattr_getrobust_np F GLIBC_2.41 pthread_mutexattr_gettype F GLIBC_2.41 pthread_mutexattr_setprotocol F GLIBC_2.41 pthread_mutexattr_setpshared F +GLIBC_2.41 pthread_mutexattr_setrobust F +GLIBC_2.41 pthread_mutexattr_setrobust_np F GLIBC_2.41 pthread_mutexattr_settype F GLIBC_2.41 pthread_sigmask F HURD_CTHREADS_0.3 __cthread_getspecific F diff --git a/sysdeps/mach/hurd/x86_64/libpthread.abilist b/sysdeps/mach/hurd/x86_64/libpthread.abilist index 866890c..b382b48 100644 --- a/sysdeps/mach/hurd/x86_64/libpthread.abilist +++ b/sysdeps/mach/hurd/x86_64/libpthread.abilist @@ -74,11 +74,7 @@ GLIBC_2.38 pthread_mutex_transfer_np F GLIBC_2.38 pthread_mutex_trylock F GLIBC_2.38 pthread_mutex_unlock F GLIBC_2.38 pthread_mutexattr_getprioceiling F -GLIBC_2.38 pthread_mutexattr_getrobust F -GLIBC_2.38 pthread_mutexattr_getrobust_np F GLIBC_2.38 pthread_mutexattr_setprioceiling F -GLIBC_2.38 pthread_mutexattr_setrobust F -GLIBC_2.38 pthread_mutexattr_setrobust_np F GLIBC_2.38 pthread_once F GLIBC_2.38 pthread_rwlock_clockrdlock F GLIBC_2.38 pthread_rwlock_clockwrlock F |