projects
/
musl
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
report that posix_spawn is supported in unistd.h and sysconf
[musl]
/
src
/
thread
/
pthread_rwlock_wrlock.c
diff --git
a/src/thread/pthread_rwlock_wrlock.c
b/src/thread/pthread_rwlock_wrlock.c
index
8fd9ad1
..
7f33535
100644
(file)
--- a/
src/thread/pthread_rwlock_wrlock.c
+++ b/
src/thread/pthread_rwlock_wrlock.c
@@
-2,12
+2,5
@@
int pthread_rwlock_wrlock(pthread_rwlock_t *rw)
{
int pthread_rwlock_wrlock(pthread_rwlock_t *rw)
{
- int nr;
- while (pthread_rwlock_trywrlock(rw)==EAGAIN) {
- if ((nr=rw->_rw_readers))
- __wait(&rw->_rw_readers, &rw->_rw_waiters, nr, 0);
- else
- __wait(&rw->_rw_wrlock, &rw->_rw_waiters, 1, 0);
- }
- return 0;
+ return pthread_rwlock_timedwrlock(rw, 0);
}
}