about summary refs log tree commit diff
path: root/sysdeps/pthread
diff options
context:
space:
mode:
authorFlorian Weimer <fweimer@redhat.com>2021-05-11 11:08:00 +0200
committerFlorian Weimer <fweimer@redhat.com>2021-05-11 11:24:39 +0200
commitdf65f897e9501aa5b64a5cbcb101301715f2ec2f (patch)
treeed8e6ba638dde4a447fb1a30107a62f8287dcb4f /sysdeps/pthread
parent8fbb33b3f74560ea3c74d289bdf59cffce52b463 (diff)
downloadglibc-df65f897e9501aa5b64a5cbcb101301715f2ec2f.tar.gz
glibc-df65f897e9501aa5b64a5cbcb101301715f2ec2f.tar.xz
glibc-df65f897e9501aa5b64a5cbcb101301715f2ec2f.zip
nptl: Move pthread_detach, thrd_detach into libc
The symbols were moved using scripts/move-symbol-to-libc.py.

Reviewed-by: Adhemerval Zanella  <adhemerval.zanella@linaro.org>
Diffstat (limited to 'sysdeps/pthread')
-rw-r--r--sysdeps/pthread/Makefile3
-rw-r--r--sysdeps/pthread/thrd_detach.c11
2 files changed, 12 insertions, 2 deletions
diff --git a/sysdeps/pthread/Makefile b/sysdeps/pthread/Makefile
index 54bb11bab9..ec8e3af577 100644
--- a/sysdeps/pthread/Makefile
+++ b/sysdeps/pthread/Makefile
@@ -31,7 +31,7 @@ headers += threads.h
 
 routines += thrd_current thrd_equal thrd_sleep thrd_yield
 
-libpthread-routines += thrd_create thrd_detach thrd_join
+libpthread-routines += thrd_create thrd_join
 
 $(libpthread-routines-var) += \
   call_once \
@@ -47,6 +47,7 @@ $(libpthread-routines-var) += \
   mtx_timedlock \
   mtx_trylock \
   mtx_unlock \
+  thrd_detach \
   thrd_exit \
   tss_create \
   tss_delete \
diff --git a/sysdeps/pthread/thrd_detach.c b/sysdeps/pthread/thrd_detach.c
index cbc63f57a2..29ac011d5b 100644
--- a/sysdeps/pthread/thrd_detach.c
+++ b/sysdeps/pthread/thrd_detach.c
@@ -17,12 +17,21 @@
    <https://www.gnu.org/licenses/>.  */
 
 #include "thrd_priv.h"
+#include <shlib-compat.h>
 
 int
-thrd_detach (thrd_t thr)
+__thrd_detach (thrd_t thr)
 {
   int err_code;
 
   err_code = __pthread_detach (thr);
   return thrd_err_map (err_code);
 }
+#if PTHREAD_IN_LIBC
+versioned_symbol (libc, __thrd_detach, thrd_detach, GLIBC_2_34);
+# if OTHER_SHLIB_COMPAT (libpthread, GLIBC_2_28, GLIBC_2_34)
+compat_symbol (libc, __thrd_detach, thrd_detach, GLIBC_2_28);
+# endif
+#else /* !PTHREAD_IN_LIBC */
+strong_alias (__thrd_detach, thrd_detach)
+#endif