aboutsummaryrefslogtreecommitdiff
path: root/nptl
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 /nptl
parent8fbb33b3f74560ea3c74d289bdf59cffce52b463 (diff)
downloadglibc-df65f897e9501aa5b64a5cbcb101301715f2ec2f.zip
glibc-df65f897e9501aa5b64a5cbcb101301715f2ec2f.tar.gz
glibc-df65f897e9501aa5b64a5cbcb101301715f2ec2f.tar.bz2
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 'nptl')
-rw-r--r--nptl/Makefile2
-rw-r--r--nptl/Versions6
-rw-r--r--nptl/pthreadP.h1
-rw-r--r--nptl/pthread_detach.c14
4 files changed, 17 insertions, 6 deletions
diff --git a/nptl/Makefile b/nptl/Makefile
index 9c69b86..5e0347b 100644
--- a/nptl/Makefile
+++ b/nptl/Makefile
@@ -95,6 +95,7 @@ routines = \
pthread_condattr_init \
pthread_condattr_setclock \
pthread_condattr_setpshared \
+ pthread_detach \
pthread_equal \
pthread_exit \
pthread_getaffinity \
@@ -198,7 +199,6 @@ libpthread-routines = \
pthread_cancel \
pthread_clockjoin \
pthread_create \
- pthread_detach \
pthread_getattr_default_np \
pthread_getconcurrency \
pthread_getcpuclockid \
diff --git a/nptl/Versions b/nptl/Versions
index da610a4..46ae34a 100644
--- a/nptl/Versions
+++ b/nptl/Versions
@@ -37,6 +37,7 @@ libc {
pthread_cond_wait;
pthread_condattr_destroy;
pthread_condattr_init;
+ pthread_detach;
pthread_equal;
pthread_exit;
pthread_getschedparam;
@@ -186,6 +187,7 @@ libc {
mtx_trylock;
mtx_unlock;
thrd_current;
+ thrd_detach;
thrd_equal;
thrd_exit;
thrd_sleep;
@@ -240,6 +242,7 @@ libc {
pthread_condattr_getpshared;
pthread_condattr_setclock;
pthread_condattr_setpshared;
+ pthread_detach;
pthread_getspecific;
pthread_key_create;
pthread_key_delete;
@@ -295,6 +298,7 @@ libc {
sem_trywait;
sem_unlink;
sem_wait;
+ thrd_detach;
thrd_exit;
tss_create;
tss_delete;
@@ -365,7 +369,6 @@ libpthread {
funlockfile;
pthread_cancel;
pthread_create;
- pthread_detach;
pthread_join;
pthread_sigmask;
}
@@ -449,7 +452,6 @@ libpthread {
# C11 thread symbols.
GLIBC_2.28 {
thrd_create;
- thrd_detach;
thrd_join;
}
diff --git a/nptl/pthreadP.h b/nptl/pthreadP.h
index d580f71..34d133b 100644
--- a/nptl/pthreadP.h
+++ b/nptl/pthreadP.h
@@ -529,6 +529,7 @@ extern int __pthread_atfork (void (*prepare) (void), void (*parent) (void),
extern pthread_t __pthread_self (void);
extern int __pthread_equal (pthread_t thread1, pthread_t thread2);
extern int __pthread_detach (pthread_t th);
+libc_hidden_proto (__pthread_detach)
extern int __pthread_cancel (pthread_t th);
extern int __pthread_kill (pthread_t threadid, int signo);
extern void __pthread_exit (void *value) __attribute__ ((__noreturn__));
diff --git a/nptl/pthread_detach.c b/nptl/pthread_detach.c
index 410255b..ac50db9 100644
--- a/nptl/pthread_detach.c
+++ b/nptl/pthread_detach.c
@@ -19,10 +19,10 @@
#include <errno.h>
#include "pthreadP.h"
#include <atomic.h>
-
+#include <shlib-compat.h>
int
-__pthread_detach (pthread_t th)
+___pthread_detach (pthread_t th)
{
struct pthread *pd = (struct pthread *) th;
@@ -53,4 +53,12 @@ __pthread_detach (pthread_t th)
return result;
}
-weak_alias (__pthread_detach, pthread_detach)
+versioned_symbol (libc, ___pthread_detach, pthread_detach, GLIBC_2_34);
+libc_hidden_ver (___pthread_detach, __pthread_detach)
+#ifndef SHARED
+strong_alias (___pthread_detach, __pthread_detach)
+#endif
+
+#if OTHER_SHLIB_COMPAT (libpthread, GLIBC_2_0, GLIBC_2_34)
+compat_symbol (libc, ___pthread_detach, pthread_detach, GLIBC_2_0);
+#endif