X-Git-Url: http://nsz.repo.hu/git/?p=musl;a=blobdiff_plain;f=src%2Fthread%2Fpthread_rwlock_trywrlock.c;h=1bcf7c998f3a113773b60e8c76ed8f1b8c841db7;hp=c029b87408081b30c9ddcc39ed637e3b5e47d8ae;hb=e882756311c7b06e59fcc8e582f03852b7dcfd30;hpb=0b44a0315b47dd8eced9f3b7f31580cf14bbfc01;ds=sidebyside diff --git a/src/thread/pthread_rwlock_trywrlock.c b/src/thread/pthread_rwlock_trywrlock.c index c029b874..1bcf7c99 100644 --- a/src/thread/pthread_rwlock_trywrlock.c +++ b/src/thread/pthread_rwlock_trywrlock.c @@ -2,12 +2,12 @@ int pthread_rwlock_trywrlock(pthread_rwlock_t *rw) { - if (a_xchg(&rw->__wrlock, 1)) + if (a_xchg(&rw->_rw_wrlock, 1)) return EAGAIN; - if (rw->__readers) { - a_store(&rw->__wrlock, 0); + if (rw->_rw_readers) { + a_store(&rw->_rw_wrlock, 0); return EAGAIN; } - rw->__owner = pthread_self()->tid; + rw->_rw_owner = pthread_self()->tid; return 0; }