mirror of https://git.musl-libc.org/git/musl
Browse Source
commit 84d061d5a3 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.
master
9 changed files with 41 additions and 20 deletions
@ -1,6 +1,8 @@ |
|||
#include "pthread_impl.h" |
|||
|
|||
int pthread_rwlock_rdlock(pthread_rwlock_t *rw) |
|||
int __pthread_rwlock_rdlock(pthread_rwlock_t *rw) |
|||
{ |
|||
return pthread_rwlock_timedrdlock(rw, 0); |
|||
return __pthread_rwlock_timedrdlock(rw, 0); |
|||
} |
|||
|
|||
weak_alias(__pthread_rwlock_rdlock, pthread_rwlock_rdlock); |
|||
|
|||
@ -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); |
|||
|
|||
@ -1,6 +1,8 @@ |
|||
#include "pthread_impl.h" |
|||
|
|||
int pthread_rwlock_wrlock(pthread_rwlock_t *rw) |
|||
int __pthread_rwlock_wrlock(pthread_rwlock_t *rw) |
|||
{ |
|||
return pthread_rwlock_timedwrlock(rw, 0); |
|||
return __pthread_rwlock_timedwrlock(rw, 0); |
|||
} |
|||
|
|||
weak_alias(__pthread_rwlock_wrlock, pthread_rwlock_wrlock); |
|||
|
|||
Loading…
Reference in new issue