summaryrefslogtreecommitdiff
path: root/src/thread/pthread_rwlock_trywrlock.c
diff options
context:
space:
mode:
authorRich Felker <dalias@aerifal.cx>2019-02-16 11:44:07 -0500
committerRich Felker <dalias@aerifal.cx>2019-02-16 11:44:07 -0500
commit639bcf251e549f634da9a3e7ef8528eb2ec12505 (patch)
tree799fe258d444002e5f04c619e43cd46a0db94287 /src/thread/pthread_rwlock_trywrlock.c
parentba74a42cee90c9a4425188a021b6ad8ba80b9468 (diff)
downloadmusl-639bcf251e549f634da9a3e7ef8528eb2ec12505.tar.gz
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.
Diffstat (limited to 'src/thread/pthread_rwlock_trywrlock.c')
-rw-r--r--src/thread/pthread_rwlock_trywrlock.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/thread/pthread_rwlock_trywrlock.c b/src/thread/pthread_rwlock_trywrlock.c
index bb3d3a99..64d9d312 100644
--- a/src/thread/pthread_rwlock_trywrlock.c
+++ b/src/thread/pthread_rwlock_trywrlock.c
@@ -1,7 +1,9 @@
#include "pthread_impl.h"
-int pthread_rwlock_trywrlock(pthread_rwlock_t *rw)
+int __pthread_rwlock_trywrlock(pthread_rwlock_t *rw)
{
if (a_cas(&rw->_rw_lock, 0, 0x7fffffff)) return EBUSY;
return 0;
}
+
+weak_alias(__pthread_rwlock_trywrlock, pthread_rwlock_trywrlock);