From 75376a3fb8429e3cf8275337ac56bf5f8127303b Mon Sep 17 00:00:00 2001 From: Florian Weimer Date: Wed, 21 Apr 2021 19:49:50 +0200 Subject: 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 --- nptl/Makefile | 2 +- nptl/Versions | 1 - nptl/forward.c | 2 -- nptl/nptl-init.c | 1 - nptl/pthreadP.h | 1 + nptl/pthread_setcanceltype.c | 3 ++- 6 files changed, 4 insertions(+), 6 deletions(-) (limited to 'nptl') 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) -- cgit 1.4.1