From 639bcf251e549f634da9a3e7ef8528eb2ec12505 Mon Sep 17 00:00:00 2001 From: Rich Felker Date: Sat, 16 Feb 2019 11:44:07 -0500 Subject: introduce namespace-safe rwlock aliases; use in pthread_key_create commit 84d061d5a31c9c773e29e1e2b1ffe8cb9557bc58 inadvertently introduced namespace violations by using the pthread-namespace rwlock functions in pthread_key_create, which is in turn used for C11 tss. fix that and possible future uses of rwlocks elsewhere. --- src/thread/pthread_rwlock_tryrdlock.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/thread/pthread_rwlock_tryrdlock.c') diff --git a/src/thread/pthread_rwlock_tryrdlock.c b/src/thread/pthread_rwlock_tryrdlock.c index fa271fcc..c13bc9cc 100644 --- a/src/thread/pthread_rwlock_tryrdlock.c +++ b/src/thread/pthread_rwlock_tryrdlock.c @@ -1,6 +1,6 @@ #include "pthread_impl.h" -int pthread_rwlock_tryrdlock(pthread_rwlock_t *rw) +int __pthread_rwlock_tryrdlock(pthread_rwlock_t *rw) { int val, cnt; do { @@ -11,3 +11,5 @@ int pthread_rwlock_tryrdlock(pthread_rwlock_t *rw) } while (a_cas(&rw->_rw_lock, val, val+1) != val); return 0; } + +weak_alias(__pthread_rwlock_tryrdlock, pthread_rwlock_tryrdlock); -- cgit v1.2.1