aboutsummaryrefslogtreecommitdiff
path: root/nptl
diff options
context:
space:
mode:
authorFlorian Weimer <fweimer@redhat.com>2021-05-11 11:56:37 +0200
committerFlorian Weimer <fweimer@redhat.com>2021-05-11 20:21:30 +0200
commitd7c51fe4f0efd7f3ca505b5d5b3a02d5d72d9bbd (patch)
tree2b7345efa44b58f1bc05800fd4e76df39a6737d6 /nptl
parentc4c53e0f56ed14ba2416bb0181e82a9d49eefde0 (diff)
downloadglibc-d7c51fe4f0efd7f3ca505b5d5b3a02d5d72d9bbd.zip
glibc-d7c51fe4f0efd7f3ca505b5d5b3a02d5d72d9bbd.tar.gz
glibc-d7c51fe4f0efd7f3ca505b5d5b3a02d5d72d9bbd.tar.bz2
nptl: Move pthread_cancel into libc
The symbol was 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/Versions3
-rw-r--r--nptl/pthreadP.h1
-rw-r--r--nptl/pthread_cancel.c6
4 files changed, 8 insertions, 4 deletions
diff --git a/nptl/Makefile b/nptl/Makefile
index 2d98e43..5ce295c 100644
--- a/nptl/Makefile
+++ b/nptl/Makefile
@@ -94,6 +94,7 @@ routines = \
pthread_barrierattr_getpshared \
pthread_barrierattr_init \
pthread_barrierattr_setpshared \
+ pthread_cancel \
pthread_cleanup_upto \
pthread_clockjoin \
pthread_cond_broadcast \
@@ -201,7 +202,6 @@ libpthread-routines = \
libpthread-compat \
nptl-init \
pt-interp \
- pthread_cancel \
pthread_create \
pthread_getattr_default_np \
pthread_getconcurrency \
diff --git a/nptl/Versions b/nptl/Versions
index ac839fb..776abde 100644
--- a/nptl/Versions
+++ b/nptl/Versions
@@ -29,6 +29,7 @@ libc {
pthread_attr_setschedparam;
pthread_attr_setschedpolicy;
pthread_attr_setscope;
+ pthread_cancel;
pthread_cond_broadcast;
pthread_cond_destroy;
pthread_cond_init;
@@ -271,6 +272,7 @@ libc {
pthread_barrierattr_getpshared;
pthread_barrierattr_init;
pthread_barrierattr_setpshared;
+ pthread_cancel;
pthread_clockjoin_np;
pthread_cond_clockwait;
pthread_condattr_getclock;
@@ -406,7 +408,6 @@ libpthread {
flockfile;
ftrylockfile;
funlockfile;
- pthread_cancel;
pthread_create;
pthread_sigmask;
}
diff --git a/nptl/pthreadP.h b/nptl/pthreadP.h
index 1692788..5b844f3 100644
--- a/nptl/pthreadP.h
+++ b/nptl/pthreadP.h
@@ -521,7 +521,6 @@ 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__));
libc_hidden_proto (__pthread_exit)
diff --git a/nptl/pthread_cancel.c b/nptl/pthread_cancel.c
index fd04bed..e4ad602 100644
--- a/nptl/pthread_cancel.c
+++ b/nptl/pthread_cancel.c
@@ -100,6 +100,10 @@ __pthread_cancel (pthread_t th)
return result;
}
-weak_alias (__pthread_cancel, pthread_cancel)
+versioned_symbol (libc, __pthread_cancel, pthread_cancel, GLIBC_2_34);
+
+#if OTHER_SHLIB_COMPAT (libpthread, GLIBC_2_0, GLIBC_2_34)
+compat_symbol (libpthread, __pthread_cancel, pthread_cancel, GLIBC_2_0);
+#endif
PTHREAD_STATIC_FN_REQUIRE (__pthread_create)