From: gfleury <gfle...@disroot.org>

Message-ID: <20250815181500.107433-18-gfle...@disroot.org>
---
 htl/Makefile                                |  2 +-
 htl/Versions                                | 12 ++++++---
 htl/pt-join.c                               | 30 ++++++++++++++++++---
 sysdeps/htl/pthreadP.h                      | 10 +++++++
 sysdeps/mach/hurd/i386/libc.abilist         |  8 ++++++
 sysdeps/mach/hurd/i386/libpthread.abilist   |  4 ---
 sysdeps/mach/hurd/x86_64/libc.abilist       |  8 ++++++
 sysdeps/mach/hurd/x86_64/libpthread.abilist |  4 ---
 8 files changed, 61 insertions(+), 17 deletions(-)

diff --git a/htl/Makefile b/htl/Makefile
index 8530098a71..ab78372da7 100644
--- a/htl/Makefile
+++ b/htl/Makefile
@@ -27,7 +27,6 @@ LCLHDRS :=
 libpthread-routines := \
   pt-create \
   pt-initialize \
-  pt-join \
   pt-spin-inlines \
   pt-hurd-cond-wait \
   pt-hurd-cond-timedwait \
@@ -147,6 +146,7 @@ routines := \
   pt-getschedparam \
   pt-getspecific \
   pt-init-specific \
+  pt-join \
   pt-key-create \
   pt-key-delete \
   pt-kill \
diff --git a/htl/Versions b/htl/Versions
index 44af006b74..1c7e82c1d3 100644
--- a/htl/Versions
+++ b/htl/Versions
@@ -55,6 +55,7 @@ libc {
     pthread_detach;
     pthread_getattr_np;
     pthread_getconcurrency;
+    pthread_join;
     pthread_key_create;
     pthread_key_delete;
     pthread_kill;
@@ -129,6 +130,7 @@ libc {
     thrd_current; thrd_equal; thrd_sleep; thrd_yield;
 
     pthread_cond_clockwait;
+    pthread_clockjoin_np;
 
     pthread_mutex_clocklock;
 
@@ -138,6 +140,7 @@ libc {
     pthread_mutexattr_setrobust; pthread_mutexattr_setrobust_np;
 
     pthread_rwlock_clockrdlock; pthread_rwlock_clockwrlock;
+    pthread_timedjoin_np; pthread_tryjoin_np;
   }
 
   GLIBC_2.41 {
@@ -202,15 +205,19 @@ libc {
 
   GLIBC_2.43 {
     pthread_cancel;
+    pthread_clockjoin_np;
     pthread_detach;
     pthread_getattr_np;
     pthread_getconcurrency;
     pthread_getcpuclockid;
+    pthread_join;
     pthread_kill;
     pthread_mutex_transfer_np;
     pthread_setconcurrency;
     pthread_setschedprio;
     pthread_testcancel;
+    pthread_timedjoin_np;
+    pthread_tryjoin_np;
     pthread_yield;
   }
 
@@ -248,6 +255,7 @@ libc {
     __pthread_destroy_specific;
     __pthread_exit;
     __pthread_getspecific;
+    __pthread_join;
     __pthread_key_delete;
     __pthread_max_threads;
     __pthread_mutex_checklocked;
@@ -301,8 +309,6 @@ libpthread {
 
     pthread_create;
 
-    pthread_join;
-
     sem_close; sem_destroy; sem_getvalue; sem_init; sem_open; sem_post;
     sem_timedwait; sem_trywait; sem_unlink; sem_wait;
 
@@ -325,8 +331,6 @@ libpthread {
     cnd_broadcast; cnd_destroy; cnd_init; cnd_signal; cnd_timedwait; cnd_wait;
     tss_create; tss_delete; tss_get; tss_set;
 
-    pthread_tryjoin_np; pthread_timedjoin_np; pthread_clockjoin_np;
-
     sem_clockwait;
   }
 
diff --git a/htl/pt-join.c b/htl/pt-join.c
index 4e4798a476..7a8da01803 100644
--- a/htl/pt-join.c
+++ b/htl/pt-join.c
@@ -21,6 +21,8 @@
 #include <stddef.h>
 
 #include <pt-internal.h>
+#include <shlib-compat.h>
+#include <ldsodefs.h>
 
 /* Make calling thread wait for termination of thread THREAD.  Return
    the exit status of the thread in *STATUS.  */
@@ -96,14 +98,24 @@ __pthread_join (pthread_t thread, void **status)
 {
   return __pthread_join_common (thread, status, 0, CLOCK_REALTIME, NULL);
 }
-weak_alias (__pthread_join, pthread_join);
+libc_hidden_def (__pthread_join)
+versioned_symbol (libc, __pthread_join, pthread_join, GLIBC_2_43);
+
+#if OTHER_SHLIB_COMPAT (libpthread, GLIBC_2_12, GLIBC_2_43)
+compat_symbol (libc, __pthread_join, pthread_join, GLIBC_2_12);
+#endif
 
 int
 __pthread_tryjoin_np (pthread_t thread, void **status)
 {
   return __pthread_join_common (thread, status, 1, CLOCK_REALTIME, NULL);
 }
-weak_alias (__pthread_tryjoin_np, pthread_tryjoin_np);
+libc_hidden_def (__pthread_tryjoin_np)
+versioned_symbol (libc, __pthread_tryjoin_np, pthread_tryjoin_np, GLIBC_2_43);
+
+#if OTHER_SHLIB_COMPAT (libpthread, GLIBC_2_32, GLIBC_2_43)
+compat_symbol (libc, __pthread_tryjoin_np, pthread_tryjoin_np, GLIBC_2_32);
+#endif
 
 int
 __pthread_timedjoin_np (pthread_t thread, void **status,
@@ -111,7 +123,12 @@ __pthread_timedjoin_np (pthread_t thread, void **status,
 {
   return __pthread_join_common (thread, status, 0, CLOCK_REALTIME, abstime);
 }
-weak_alias (__pthread_timedjoin_np, pthread_timedjoin_np);
+libc_hidden_def (__pthread_timedjoin_np)
+versioned_symbol (libc, __pthread_timedjoin_np, pthread_timedjoin_np, 
GLIBC_2_43);
+
+#if OTHER_SHLIB_COMPAT (libpthread, GLIBC_2_32, GLIBC_2_43)
+compat_symbol (libc, __pthread_timedjoin_np, pthread_timedjoin_np, GLIBC_2_32);
+#endif
 
 int
 __pthread_clockjoin_np (pthread_t thread, void **status,
@@ -120,4 +137,9 @@ __pthread_clockjoin_np (pthread_t thread, void **status,
 {
   return __pthread_join_common (thread, status, 0, clockid, abstime);
 }
-weak_alias (__pthread_clockjoin_np, pthread_clockjoin_np);
+libc_hidden_def (__pthread_clockjoin_np)
+versioned_symbol (libc, __pthread_clockjoin_np, pthread_clockjoin_np, 
GLIBC_2_43);
+
+#if OTHER_SHLIB_COMPAT (libpthread, GLIBC_2_32, GLIBC_2_43)
+compat_symbol (libc, __pthread_clockjoin_np, pthread_clockjoin_np, GLIBC_2_32);
+#endif
diff --git a/sysdeps/htl/pthreadP.h b/sysdeps/htl/pthreadP.h
index e0f0f7d45d..9273a5885f 100644
--- a/sysdeps/htl/pthreadP.h
+++ b/sysdeps/htl/pthreadP.h
@@ -184,6 +184,16 @@ libc_hidden_proto (__pthread_detach)
 void __pthread_exit (void *value) __attribute__ ((__noreturn__));
 libc_hidden_proto (__pthread_exit)
 int __pthread_join (pthread_t, void **);
+libc_hidden_proto (__pthread_join)
+int __pthread_tryjoin_np (pthread_t __th, void **__thread_return);
+libc_hidden_proto (__pthread_tryjoin_np)
+int __pthread_timedjoin_np (pthread_t __th, void **__thread_return,
+                                const struct timespec *__abstime);
+libc_hidden_proto (__pthread_timedjoin_np)
+int __pthread_clockjoin_np (pthread_t __th, void **__thread_return,
+                                 clockid_t __clockid,
+                                const struct timespec *__abstime);
+libc_hidden_proto (__pthread_clockjoin_np)
 int __cthread_keycreate (__cthread_key_t *);
 int __cthread_getspecific (__cthread_key_t, void **);
 int __cthread_setspecific (__cthread_key_t, void *);
diff --git a/sysdeps/mach/hurd/i386/libc.abilist 
b/sysdeps/mach/hurd/i386/libc.abilist
index 2ec557b26d..1e5454818a 100644
--- a/sysdeps/mach/hurd/i386/libc.abilist
+++ b/sysdeps/mach/hurd/i386/libc.abilist
@@ -81,6 +81,7 @@ GLIBC_2.12 pthread_getconcurrency F
 GLIBC_2.12 pthread_getcpuclockid F
 GLIBC_2.12 pthread_getschedparam F
 GLIBC_2.12 pthread_getspecific F
+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
@@ -2313,6 +2314,7 @@ GLIBC_2.30 twalk_r F
 GLIBC_2.32 __libc_single_threaded D 0x1
 GLIBC_2.32 mach_print F
 GLIBC_2.32 mremap F
+GLIBC_2.32 pthread_clockjoin_np F
 GLIBC_2.32 pthread_cond_clockwait F
 GLIBC_2.32 pthread_mutex_clocklock F
 GLIBC_2.32 pthread_mutex_consistent F
@@ -2323,6 +2325,8 @@ 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
+GLIBC_2.32 pthread_tryjoin_np F
 GLIBC_2.32 sigabbrev_np F
 GLIBC_2.32 sigdescr_np F
 GLIBC_2.32 strerrordesc_np F
@@ -2648,15 +2652,19 @@ GLIBC_2.42 uimaxabs F
 GLIBC_2.42 ulabs F
 GLIBC_2.42 ullabs F
 GLIBC_2.43 pthread_cancel F
+GLIBC_2.43 pthread_clockjoin_np F
 GLIBC_2.43 pthread_detach F
 GLIBC_2.43 pthread_getattr_np F
 GLIBC_2.43 pthread_getconcurrency F
 GLIBC_2.43 pthread_getcpuclockid F
+GLIBC_2.43 pthread_join F
 GLIBC_2.43 pthread_kill F
 GLIBC_2.43 pthread_mutex_transfer_np F
 GLIBC_2.43 pthread_setconcurrency F
 GLIBC_2.43 pthread_setschedprio F
 GLIBC_2.43 pthread_testcancel F
+GLIBC_2.43 pthread_timedjoin_np F
+GLIBC_2.43 pthread_tryjoin_np F
 GLIBC_2.43 pthread_yield F
 GLIBC_2.5 __readlinkat_chk F
 GLIBC_2.5 inet6_opt_append F
diff --git a/sysdeps/mach/hurd/i386/libpthread.abilist 
b/sysdeps/mach/hurd/i386/libpthread.abilist
index 3f3c17c15e..8a056c89ff 100644
--- a/sysdeps/mach/hurd/i386/libpthread.abilist
+++ b/sysdeps/mach/hurd/i386/libpthread.abilist
@@ -19,7 +19,6 @@ GLIBC_2.12 ftrylockfile F
 GLIBC_2.12 funlockfile F
 GLIBC_2.12 pthread_atfork F
 GLIBC_2.12 pthread_create F
-GLIBC_2.12 pthread_join F
 GLIBC_2.12 pthread_spin_destroy F
 GLIBC_2.12 pthread_spin_init F
 GLIBC_2.12 pthread_spin_lock F
@@ -55,9 +54,6 @@ GLIBC_2.32 mtx_lock F
 GLIBC_2.32 mtx_timedlock F
 GLIBC_2.32 mtx_trylock F
 GLIBC_2.32 mtx_unlock F
-GLIBC_2.32 pthread_clockjoin_np F
-GLIBC_2.32 pthread_timedjoin_np F
-GLIBC_2.32 pthread_tryjoin_np F
 GLIBC_2.32 sem_clockwait F
 GLIBC_2.32 thrd_create F
 GLIBC_2.32 thrd_detach F
diff --git a/sysdeps/mach/hurd/x86_64/libc.abilist 
b/sysdeps/mach/hurd/x86_64/libc.abilist
index 2e7e00773a..1bf1bcabe4 100644
--- a/sysdeps/mach/hurd/x86_64/libc.abilist
+++ b/sysdeps/mach/hurd/x86_64/libc.abilist
@@ -1542,6 +1542,7 @@ GLIBC_2.38 pthread_barrierattr_getpshared F
 GLIBC_2.38 pthread_barrierattr_init F
 GLIBC_2.38 pthread_barrierattr_setpshared F
 GLIBC_2.38 pthread_cancel F
+GLIBC_2.38 pthread_clockjoin_np F
 GLIBC_2.38 pthread_cond_broadcast F
 GLIBC_2.38 pthread_cond_clockwait F
 GLIBC_2.38 pthread_cond_destroy F
@@ -1563,6 +1564,7 @@ GLIBC_2.38 pthread_getconcurrency F
 GLIBC_2.38 pthread_getcpuclockid F
 GLIBC_2.38 pthread_getschedparam F
 GLIBC_2.38 pthread_getspecific F
+GLIBC_2.38 pthread_join F
 GLIBC_2.38 pthread_key_create F
 GLIBC_2.38 pthread_key_delete F
 GLIBC_2.38 pthread_kill F
@@ -1617,6 +1619,8 @@ GLIBC_2.38 pthread_setschedprio F
 GLIBC_2.38 pthread_setspecific F
 GLIBC_2.38 pthread_sigmask F
 GLIBC_2.38 pthread_testcancel F
+GLIBC_2.38 pthread_timedjoin_np F
+GLIBC_2.38 pthread_tryjoin_np F
 GLIBC_2.38 pthread_yield F
 GLIBC_2.38 ptrace F
 GLIBC_2.38 ptsname F
@@ -2329,15 +2333,19 @@ GLIBC_2.42 uimaxabs F
 GLIBC_2.42 ulabs F
 GLIBC_2.42 ullabs F
 GLIBC_2.43 pthread_cancel F
+GLIBC_2.43 pthread_clockjoin_np F
 GLIBC_2.43 pthread_detach F
 GLIBC_2.43 pthread_getattr_np F
 GLIBC_2.43 pthread_getconcurrency F
 GLIBC_2.43 pthread_getcpuclockid F
+GLIBC_2.43 pthread_join F
 GLIBC_2.43 pthread_kill F
 GLIBC_2.43 pthread_mutex_transfer_np F
 GLIBC_2.43 pthread_setconcurrency F
 GLIBC_2.43 pthread_setschedprio F
 GLIBC_2.43 pthread_testcancel F
+GLIBC_2.43 pthread_timedjoin_np F
+GLIBC_2.43 pthread_tryjoin_np F
 GLIBC_2.43 pthread_yield F
 HURD_CTHREADS_0.3 __cthread_getspecific F
 HURD_CTHREADS_0.3 __cthread_keycreate F
diff --git a/sysdeps/mach/hurd/x86_64/libpthread.abilist 
b/sysdeps/mach/hurd/x86_64/libpthread.abilist
index 6dfca3f44d..5caa7bcfb9 100644
--- a/sysdeps/mach/hurd/x86_64/libpthread.abilist
+++ b/sysdeps/mach/hurd/x86_64/libpthread.abilist
@@ -35,18 +35,14 @@ GLIBC_2.38 mtx_lock F
 GLIBC_2.38 mtx_timedlock F
 GLIBC_2.38 mtx_trylock F
 GLIBC_2.38 mtx_unlock F
-GLIBC_2.38 pthread_clockjoin_np F
 GLIBC_2.38 pthread_create F
 GLIBC_2.38 pthread_hurd_cond_timedwait_np F
 GLIBC_2.38 pthread_hurd_cond_wait_np F
-GLIBC_2.38 pthread_join F
 GLIBC_2.38 pthread_spin_destroy F
 GLIBC_2.38 pthread_spin_init F
 GLIBC_2.38 pthread_spin_lock F
 GLIBC_2.38 pthread_spin_trylock F
 GLIBC_2.38 pthread_spin_unlock F
-GLIBC_2.38 pthread_timedjoin_np F
-GLIBC_2.38 pthread_tryjoin_np F
 GLIBC_2.38 sem_clockwait F
 GLIBC_2.38 sem_close F
 GLIBC_2.38 sem_destroy F
-- 
2.47.2


Reply via email to