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