]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
htl: move pthread_mutex_destroy into libc.
authorgfleury <gfleury@disroot.org>
Fri, 3 Jan 2025 10:37:48 +0000 (12:37 +0200)
committerSamuel Thibault <samuel.thibault@ens-lyon.org>
Wed, 29 Jan 2025 01:32:36 +0000 (02:32 +0100)
Message-ID: <20250103103750.870897-5-gfleury@disroot.org>

htl/Makefile
htl/Versions
htl/forward.c
htl/pt-initialize.c
sysdeps/htl/libc-lockP.h
sysdeps/htl/pthread-functions.h
sysdeps/htl/pthreadP.h
sysdeps/mach/hurd/htl/pt-mutex-destroy.c
sysdeps/mach/hurd/i386/libc.abilist
sysdeps/mach/hurd/i386/libpthread.abilist
sysdeps/mach/hurd/x86_64/libpthread.abilist

index f7e12983d2c169d3108f7dca979d2e4e5a27ea2e..f6abd95772b16d61665d3725cc47190c6a5b6386 100644 (file)
@@ -54,7 +54,6 @@ libpthread-routines := \
   pt-setcanceltype \
   pt-testcancel \
   pt-cancel \
-  pt-mutex-destroy \
   pt-mutex-transfer-np \
   pt-mutex-consistent \
   pt-rwlock-attr \
@@ -182,6 +181,7 @@ routines := \
   pt-condattr-setpshared \
   pt-getschedparam \
   pt-mutex-checklocked \
+  pt-mutex-destroy \
   pt-mutex-getprioceiling \
   pt-mutex-init \
   pt-mutex-lock \
index 9c016bc6cf3d77d3685a3c2911080307fa58b891..9cd9f5a937f1aeb72ec4c32ed5503f56af8c9455 100644 (file)
@@ -38,6 +38,7 @@ libc {
     pthread_condattr_getpshared;
     pthread_condattr_setclock;
     pthread_condattr_setpshared;
+    pthread_mutex_destroy;
     pthread_mutex_getprioceiling;
     pthread_mutex_init;
     pthread_mutex_lock;
@@ -151,6 +152,7 @@ libc {
     __pthread_condattr_init;
     __pthread_default_condattr;
     __pthread_mutex_checklocked;
+    __pthread_mutex_destroy;
     __pthread_mutex_init;
     __pthread_mutex_lock;
     __pthread_mutex_timedlock;
@@ -214,7 +216,6 @@ libpthread {
     pthread_kill;
     __pthread_kill;
 
-    pthread_mutex_destroy;
     pthread_mutex_transfer_np;
 
     pthread_once;
@@ -283,7 +284,6 @@ libpthread {
     __pthread_getspecific;
     __pthread_setspecific;
     __pthread_getattr_np;
-    __pthread_mutex_destroy;
     __pthread_enable_asynccancel;
     __pthread_disable_asynccancel;
     _pthread_rwlock_destroy; _pthread_rwlock_init;
index b71099b82b53ed77d251be67fdb9214c93ad08ac..636902919ebefc8752cad809e77125fa25d993af 100644 (file)
@@ -58,8 +58,6 @@ FORWARD_NORETURN (__pthread_exit, void, (void *retval), (retval),
                  exit (EXIT_SUCCESS))
 strong_alias (__pthread_exit, pthread_exit);
 
-FORWARD (pthread_mutex_destroy, (pthread_mutex_t *mutex), (mutex), 0)
-
 FORWARD (__pthread_setcancelstate, (int state, int *oldstate),
         (state, oldstate), 0)
 strong_alias (__pthread_setcancelstate, pthread_setcancelstate);
index b8f8c95ce3dd9f2563a2b89d8f83cddc4ebc545b..5854bc496764f1de4d254bc14a077485fe019152 100644 (file)
@@ -28,7 +28,6 @@
 #if IS_IN (libpthread)
 static const struct pthread_functions pthread_functions = {
   .ptr___pthread_exit = __pthread_exit,
-  .ptr_pthread_mutex_destroy = __pthread_mutex_destroy,
   .ptr___pthread_setcancelstate = __pthread_setcancelstate,
   .ptr_pthread_setcanceltype = __pthread_setcanceltype,
   .ptr___pthread_get_cleanup_stack = __pthread_get_cleanup_stack,
index 3d74cd87e93e21583f0e38960b6d7aff85573aae..f39c8bba87c4ad80342a80f35f0c25633a274ede 100644 (file)
@@ -117,7 +117,6 @@ extern int __pthread_atfork (void (*__prepare) (void),
    single-threaded processes.  */
 #if !defined(__NO_WEAK_PTHREAD_ALIASES) && !IS_IN (libpthread)
 # ifdef weak_extern
-weak_extern (__pthread_mutex_destroy)
 weak_extern (__pthread_rwlock_init)
 weak_extern (__pthread_rwlock_destroy)
 weak_extern (__pthread_rwlock_rdlock)
@@ -133,7 +132,6 @@ weak_extern (__pthread_initialize)
 weak_extern (__pthread_atfork)
 weak_extern (__pthread_setcancelstate)
 # else
-#  pragma weak __pthread_mutex_destroy
 #  pragma weak __pthread_rwlock_destroy
 #  pragma weak __pthread_rwlock_rdlock
 #  pragma weak __pthread_rwlock_tryrdlock
index c44c9038f355a7f390e3d9afafe7c29c49bf7e90..45f15c264123d78096a7168f8fe9e6d7c110c7d6 100644 (file)
@@ -22,7 +22,6 @@
 #include <pthread.h>
 
 void __pthread_exit (void *) __attribute__ ((__noreturn__));
-int _pthread_mutex_destroy (pthread_mutex_t *);
 int __pthread_setcancelstate (int, int *);
 int __pthread_setcanceltype (int, int *);
 struct __pthread_cancelation_handler **__pthread_get_cleanup_stack (void);
@@ -44,7 +43,6 @@ int _cthreads_ftrylockfile (FILE *);
 struct pthread_functions
 {
   void (*ptr___pthread_exit) (void *) __attribute__ ((__noreturn__));
-  int (*ptr_pthread_mutex_destroy) (pthread_mutex_t *);
   int (*ptr___pthread_setcancelstate) (int, int *);
   int (*ptr_pthread_setcanceltype) (int, int *);
   struct __pthread_cancelation_handler **(*ptr___pthread_get_cleanup_stack) (void);
index e41cb4c85d8ba7c9c0b6cf59961fcfe58807793f..f8aab6af9e170163d6a72cc7420aefbfe3d69566 100644 (file)
@@ -36,7 +36,6 @@ libc_hidden_proto (__pthread_mutex_init)
 extern int __pthread_mutex_clocklock (pthread_mutex_t *__mutex, clockid_t __clockid,
                                    const struct timespec *__abstime);
 libc_hidden_proto (__pthread_mutex_clocklock)
-extern int __pthread_mutex_destroy (pthread_mutex_t *__mutex);
 extern int __pthread_mutex_lock (pthread_mutex_t *__mutex);
 libc_hidden_proto (__pthread_mutex_lock)
 extern int __pthread_mutex_getprioceiling (const pthread_mutex_t *__mutex,
@@ -176,7 +175,6 @@ hidden_proto (__pthread_detach)
 hidden_proto (__pthread_key_create)
 hidden_proto (__pthread_getspecific)
 hidden_proto (__pthread_setspecific)
-hidden_proto (__pthread_mutex_destroy)
 hidden_proto (__pthread_get_cleanup_stack)
 #endif
 
index fdb59623bb7532b0c5ef456c1fbeadf9ed40e1a4..c0624ec72f7dc346dc8e7acd00ef3caeec348519 100644 (file)
@@ -22,6 +22,7 @@
 #include <pt-internal.h>
 #include "pt-mutex.h"
 #include <hurdlock.h>
+#include <shlib-compat.h>
 
 int
 __pthread_mutex_destroy (pthread_mutex_t *mtxp)
@@ -33,6 +34,9 @@ __pthread_mutex_destroy (pthread_mutex_t *mtxp)
   mtxp->__type = -1;
   return 0;
 }
+libc_hidden_def (__pthread_mutex_destroy)
+versioned_symbol (libc, __pthread_mutex_destroy, pthread_mutex_destroy, GLIBC_2_21);
 
-weak_alias (__pthread_mutex_destroy, pthread_mutex_destroy)
-hidden_def (__pthread_mutex_destroy)
+#if OTHER_SHLIB_COMPAT (libpthread, GLIBC_2_12, GLIBC_2_21)
+compat_symbol (libc, __pthread_mutex_destroy, pthread_mutex_destroy, GLIBC_2_12);
+#endif
index c980b46bca416489ab998587dc5f08da81cb139d..f153f475c375b10c5011dd7fa005baa0dc71844b 100644 (file)
@@ -63,6 +63,7 @@ GLIBC_2.12 pthread_condattr_setclock F
 GLIBC_2.12 pthread_condattr_setpshared F
 GLIBC_2.12 pthread_equal F
 GLIBC_2.12 pthread_getschedparam F
+GLIBC_2.12 pthread_mutex_destroy F
 GLIBC_2.12 pthread_mutex_getprioceiling F
 GLIBC_2.12 pthread_mutex_init F
 GLIBC_2.12 pthread_mutex_lock F
index 0eb452eb0249394b00fd2bf9ce4f6115c4577330..53b433c7254fced6560e7b38eabc6e7445c4376f 100644 (file)
@@ -41,7 +41,6 @@ GLIBC_2.12 pthread_join F
 GLIBC_2.12 pthread_key_create F
 GLIBC_2.12 pthread_key_delete F
 GLIBC_2.12 pthread_kill F
-GLIBC_2.12 pthread_mutex_destroy F
 GLIBC_2.12 pthread_mutex_transfer_np F
 GLIBC_2.12 pthread_once F
 GLIBC_2.12 pthread_rwlock_destroy F
index faeac21d940bdb0440cb5dd8238d4a81d7443c9c..5f0f73d10f1780926120e0568e060e11437ccb52 100644 (file)
@@ -63,7 +63,6 @@ GLIBC_2.38 pthread_key_delete F
 GLIBC_2.38 pthread_kill F
 GLIBC_2.38 pthread_mutex_consistent F
 GLIBC_2.38 pthread_mutex_consistent_np F
-GLIBC_2.38 pthread_mutex_destroy F
 GLIBC_2.38 pthread_mutex_transfer_np F
 GLIBC_2.38 pthread_once F
 GLIBC_2.38 pthread_rwlock_clockrdlock F