diff options
Diffstat (limited to 'src/thread/pthread_rwlock_trywrlock.c')
-rw-r--r-- | src/thread/pthread_rwlock_trywrlock.c | 8 |
1 files changed, 4 insertions, 4 deletions
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; } |