diff options
author | Florian Weimer <fweimer@redhat.com> | 2021-04-21 19:49:51 +0200 |
---|---|---|
committer | Florian Weimer <fweimer@redhat.com> | 2021-04-21 19:49:51 +0200 |
commit | 27a448223cb2d3bab191c61303db48cee66f871c (patch) | |
tree | e9cb7ab65f5efb5d486c79ee58b4ccadfbe7896c /nptl/pthreadP.h | |
parent | 60d5e40ab200033a982a9fd7594a1f83dcdb94a0 (diff) | |
download | glibc-27a448223cb2d3bab191c61303db48cee66f871c.zip glibc-27a448223cb2d3bab191c61303db48cee66f871c.tar.gz glibc-27a448223cb2d3bab191c61303db48cee66f871c.tar.bz2 |
nptl: Move core mutex functions into libc
This is complicated because of a second compilation of
nptl/pthread_mutex_lock.c via nptl/pthread_mutex_cond_lock.c.
PTHREAD_MUTEX_VERSIONS is introduced to suppress symbol versions
in that case.
The symbols __pthread_mutex_lock, __pthread_mutex_unlock,
__pthread_mutex_init, __pthread_mutex_destroy, pthread_mutex_lock,
pthread_mutex_unlock, pthread_mutex_init, pthread_mutex_destroy
have been moved using scripts/move-symbol-to-libc.py.
Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Diffstat (limited to 'nptl/pthreadP.h')
-rw-r--r-- | nptl/pthreadP.h | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/nptl/pthreadP.h b/nptl/pthreadP.h index 5cd5d69..332744e 100644 --- a/nptl/pthreadP.h +++ b/nptl/pthreadP.h @@ -395,9 +395,12 @@ extern int __pthread_setschedparam (pthread_t thread_id, int policy, const struct sched_param *param); extern int __pthread_mutex_init (pthread_mutex_t *__mutex, const pthread_mutexattr_t *__mutexattr); +libc_hidden_proto (__pthread_mutex_init) extern int __pthread_mutex_destroy (pthread_mutex_t *__mutex); +libc_hidden_proto (__pthread_mutex_destroy) extern int __pthread_mutex_trylock (pthread_mutex_t *_mutex); extern int __pthread_mutex_lock (pthread_mutex_t *__mutex); +libc_hidden_proto (__pthread_mutex_lock) extern int __pthread_mutex_timedlock (pthread_mutex_t *__mutex, const struct timespec *__abstime); extern int __pthread_mutex_cond_lock (pthread_mutex_t *__mutex) @@ -405,8 +408,10 @@ extern int __pthread_mutex_cond_lock (pthread_mutex_t *__mutex) extern void __pthread_mutex_cond_lock_adjust (pthread_mutex_t *__mutex) attribute_hidden; extern int __pthread_mutex_unlock (pthread_mutex_t *__mutex); +libc_hidden_proto (__pthread_mutex_unlock) extern int __pthread_mutex_unlock_usercnt (pthread_mutex_t *__mutex, - int __decr) attribute_hidden; + int __decr); +libc_hidden_proto (__pthread_mutex_unlock_usercnt) extern int __pthread_mutexattr_init (pthread_mutexattr_t *attr); extern int __pthread_mutexattr_destroy (pthread_mutexattr_t *attr); extern int __pthread_mutexattr_settype (pthread_mutexattr_t *attr, int kind); @@ -560,11 +565,7 @@ libc_hidden_proto (__pthread_sigmask); #if IS_IN (libpthread) -hidden_proto (__pthread_mutex_init) -hidden_proto (__pthread_mutex_destroy) -hidden_proto (__pthread_mutex_lock) hidden_proto (__pthread_mutex_trylock) -hidden_proto (__pthread_mutex_unlock) hidden_proto (__pthread_rwlock_unlock) hidden_proto (__pthread_testcancel) hidden_proto (__pthread_mutexattr_init) |