about summary refs log tree commit diff
path: root/nptl
diff options
context:
space:
mode:
authorFlorian Weimer <fweimer@redhat.com>2021-04-21 19:49:50 +0200
committerFlorian Weimer <fweimer@redhat.com>2021-04-21 19:49:50 +0200
commit75376a3fb8429e3cf8275337ac56bf5f8127303b (patch)
tree298e27b1b8389937a3b0ce53dbc2e477de8d623b /nptl
parent93d78ec1cba68184931b75bef29afd3aed30f43a (diff)
downloadglibc-75376a3fb8429e3cf8275337ac56bf5f8127303b.tar.gz
glibc-75376a3fb8429e3cf8275337ac56bf5f8127303b.tar.xz
glibc-75376a3fb8429e3cf8275337ac56bf5f8127303b.zip
nptl: Move pthread_setcanceltype into libc
No new symbol version is required because there was a forwarder.

The symbol has been 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/Versions1
-rw-r--r--nptl/forward.c2
-rw-r--r--nptl/nptl-init.c1
-rw-r--r--nptl/pthreadP.h1
-rw-r--r--nptl/pthread_setcanceltype.c3
6 files changed, 4 insertions, 6 deletions
diff --git a/nptl/Makefile b/nptl/Makefile
index 3e0a36132d..4b3e319912 100644
--- a/nptl/Makefile
+++ b/nptl/Makefile
@@ -84,6 +84,7 @@ routines = \
   pthread_once \
   pthread_self \
   pthread_setcancelstate \
+  pthread_setcanceltype \
   pthread_setschedparam \
   pthread_sigmask \
   unwind \
@@ -187,7 +188,6 @@ libpthread-routines = \
   pthread_rwlockattr_setpshared \
   pthread_setaffinity \
   pthread_setattr_default_np \
-  pthread_setcanceltype \
   pthread_setconcurrency \
   pthread_setname \
   pthread_setschedprio \
diff --git a/nptl/Versions b/nptl/Versions
index 1314efc344..9f1a51c707 100644
--- a/nptl/Versions
+++ b/nptl/Versions
@@ -173,7 +173,6 @@ libpthread {
     pthread_mutexattr_getkind_np;
     pthread_mutexattr_init;
     pthread_mutexattr_setkind_np;
-    pthread_setcanceltype;
     pthread_setspecific;
     pthread_sigmask;
     pthread_testcancel;
diff --git a/nptl/forward.c b/nptl/forward.c
index ef4a17d39b..de4e9cd6ab 100644
--- a/nptl/forward.c
+++ b/nptl/forward.c
@@ -101,5 +101,3 @@ FORWARD (pthread_mutex_init,
 FORWARD (pthread_mutex_lock, (pthread_mutex_t *mutex), (mutex), 0)
 
 FORWARD (pthread_mutex_unlock, (pthread_mutex_t *mutex), (mutex), 0)
-
-FORWARD (pthread_setcanceltype, (int type, int *oldtype), (type, oldtype), 0)
diff --git a/nptl/nptl-init.c b/nptl/nptl-init.c
index 1dd4c02bc0..41c566c9bd 100644
--- a/nptl/nptl-init.c
+++ b/nptl/nptl-init.c
@@ -84,7 +84,6 @@ static const struct pthread_functions pthread_functions =
     .ptr_pthread_mutex_init = __pthread_mutex_init,
     .ptr_pthread_mutex_lock = __pthread_mutex_lock,
     .ptr_pthread_mutex_unlock = __pthread_mutex_unlock,
-    .ptr_pthread_setcanceltype = __pthread_setcanceltype,
     .ptr___pthread_rwlock_rdlock = __pthread_rwlock_rdlock,
     .ptr___pthread_rwlock_wrlock = __pthread_rwlock_wrlock,
     .ptr___pthread_rwlock_unlock = __pthread_rwlock_unlock,
diff --git a/nptl/pthreadP.h b/nptl/pthreadP.h
index 9215a76b61..5242a2bce6 100644
--- a/nptl/pthreadP.h
+++ b/nptl/pthreadP.h
@@ -537,6 +537,7 @@ extern void __pthread_exit (void *value) __attribute__ ((__noreturn__));
 libc_hidden_proto (__pthread_exit)
 extern int __pthread_join (pthread_t threadid, void **thread_return);
 extern int __pthread_setcanceltype (int type, int *oldtype);
+libc_hidden_proto (__pthread_setcanceltype)
 extern int __pthread_enable_asynccancel (void) attribute_hidden;
 extern void __pthread_disable_asynccancel (int oldtype) attribute_hidden;
 extern void __pthread_testcancel (void);
diff --git a/nptl/pthread_setcanceltype.c b/nptl/pthread_setcanceltype.c
index a9ce9b37fb..5f061d512b 100644
--- a/nptl/pthread_setcanceltype.c
+++ b/nptl/pthread_setcanceltype.c
@@ -68,4 +68,5 @@ __pthread_setcanceltype (int type, int *oldtype)
 
   return 0;
 }
-strong_alias (__pthread_setcanceltype, pthread_setcanceltype)
+libc_hidden_def (__pthread_setcanceltype)
+weak_alias (__pthread_setcanceltype, pthread_setcanceltype)