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
commit93d78ec1cba68184931b75bef29afd3aed30f43a (patch)
tree0306d8f4d7a01432f22b0471bed572803fb7a973 /nptl
parentc62cef023cdcd8349369ef4e0d08290e495659be (diff)
downloadglibc-93d78ec1cba68184931b75bef29afd3aed30f43a.tar.gz
glibc-93d78ec1cba68184931b75bef29afd3aed30f43a.tar.xz
glibc-93d78ec1cba68184931b75bef29afd3aed30f43a.zip
nptl: Move pthread_setcancelstate 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/Versions2
-rw-r--r--nptl/forward.c4
-rw-r--r--nptl/nptl-init.c1
-rw-r--r--nptl/pthreadP.h2
-rw-r--r--nptl/pthread_setcancelstate.c6
6 files changed, 5 insertions, 12 deletions
diff --git a/nptl/Makefile b/nptl/Makefile
index f96d905b0b..3e0a36132d 100644
--- a/nptl/Makefile
+++ b/nptl/Makefile
@@ -83,6 +83,7 @@ routines = \
   pthread_mutex_consistent \
   pthread_once \
   pthread_self \
+  pthread_setcancelstate \
   pthread_setschedparam \
   pthread_sigmask \
   unwind \
@@ -186,7 +187,6 @@ libpthread-routines = \
   pthread_rwlockattr_setpshared \
   pthread_setaffinity \
   pthread_setattr_default_np \
-  pthread_setcancelstate \
   pthread_setcanceltype \
   pthread_setconcurrency \
   pthread_setname \
diff --git a/nptl/Versions b/nptl/Versions
index f563e3b6cf..1314efc344 100644
--- a/nptl/Versions
+++ b/nptl/Versions
@@ -122,6 +122,7 @@ libc {
     __pthread_force_elision;
     __pthread_getattr_default_np;
     __pthread_keys;
+    __pthread_setcancelstate;
     __pthread_unwind;
   }
 }
@@ -172,7 +173,6 @@ libpthread {
     pthread_mutexattr_getkind_np;
     pthread_mutexattr_init;
     pthread_mutexattr_setkind_np;
-    pthread_setcancelstate;
     pthread_setcanceltype;
     pthread_setspecific;
     pthread_sigmask;
diff --git a/nptl/forward.c b/nptl/forward.c
index a4a377ba6a..ef4a17d39b 100644
--- a/nptl/forward.c
+++ b/nptl/forward.c
@@ -102,8 +102,4 @@ FORWARD (pthread_mutex_lock, (pthread_mutex_t *mutex), (mutex), 0)
 
 FORWARD (pthread_mutex_unlock, (pthread_mutex_t *mutex), (mutex), 0)
 
-FORWARD (__pthread_setcancelstate, (int state, int *oldstate),
-	 (state, oldstate), 0)
-strong_alias (__pthread_setcancelstate, pthread_setcancelstate)
-
 FORWARD (pthread_setcanceltype, (int type, int *oldtype), (type, oldtype), 0)
diff --git a/nptl/nptl-init.c b/nptl/nptl-init.c
index 761294929c..1dd4c02bc0 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_setcancelstate = __pthread_setcancelstate,
     .ptr_pthread_setcanceltype = __pthread_setcanceltype,
     .ptr___pthread_rwlock_rdlock = __pthread_rwlock_rdlock,
     .ptr___pthread_rwlock_wrlock = __pthread_rwlock_wrlock,
diff --git a/nptl/pthreadP.h b/nptl/pthreadP.h
index b99aae2bfe..9215a76b61 100644
--- a/nptl/pthreadP.h
+++ b/nptl/pthreadP.h
@@ -387,7 +387,6 @@ extern int __pthread_getschedparam (pthread_t thread_id, int *policy,
 				    struct sched_param *param);
 extern int __pthread_setschedparam (pthread_t thread_id, int policy,
 				    const struct sched_param *param);
-extern int __pthread_setcancelstate (int state, int *oldstate);
 extern int __pthread_mutex_init (pthread_mutex_t *__mutex,
 				 const pthread_mutexattr_t *__mutexattr);
 extern int __pthread_mutex_destroy (pthread_mutex_t *__mutex);
@@ -560,7 +559,6 @@ hidden_proto (__pthread_rwlock_unlock)
 hidden_proto (__pthread_key_create)
 hidden_proto (__pthread_getspecific)
 hidden_proto (__pthread_setspecific)
-hidden_proto (__pthread_setcancelstate)
 hidden_proto (__pthread_testcancel)
 hidden_proto (__pthread_mutexattr_init)
 hidden_proto (__pthread_mutexattr_settype)
diff --git a/nptl/pthread_setcancelstate.c b/nptl/pthread_setcancelstate.c
index a0ffbd9338..e3696ca348 100644
--- a/nptl/pthread_setcancelstate.c
+++ b/nptl/pthread_setcancelstate.c
@@ -19,7 +19,7 @@
 #include <errno.h>
 #include "pthreadP.h"
 #include <atomic.h>
-
+#include <libc-lockP.h>
 
 int
 __pthread_setcancelstate (int state, int *oldstate)
@@ -67,5 +67,5 @@ __pthread_setcancelstate (int state, int *oldstate)
 
   return 0;
 }
-strong_alias (__pthread_setcancelstate, pthread_setcancelstate)
-hidden_def (__pthread_setcancelstate)
+libc_hidden_def (__pthread_setcancelstate)
+weak_alias (__pthread_setcancelstate, pthread_setcancelstate)