summaryrefslogtreecommitdiffstats
path: root/lib/libc_r/uthread/uthread_rwlock.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/libc_r/uthread/uthread_rwlock.c')
-rw-r--r--lib/libc_r/uthread/uthread_rwlock.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/libc_r/uthread/uthread_rwlock.c b/lib/libc_r/uthread/uthread_rwlock.c
index 25fab59..2f55f03 100644
--- a/lib/libc_r/uthread/uthread_rwlock.c
+++ b/lib/libc_r/uthread/uthread_rwlock.c
@@ -209,7 +209,7 @@ _pthread_rwlock_tryrdlock (pthread_rwlock_t *rwlock)
/* give writers priority over readers */
if (prwlock->blocked_writers || prwlock->state < 0)
- ret = EWOULDBLOCK;
+ ret = EBUSY;
else if (prwlock->state == MAX_READ_LOCKS)
ret = EAGAIN; /* too many read locks acquired */
else
@@ -245,7 +245,7 @@ _pthread_rwlock_trywrlock (pthread_rwlock_t *rwlock)
return(ret);
if (prwlock->state != 0)
- ret = EWOULDBLOCK;
+ ret = EBUSY;
else
/* indicate we are locked for writing */
prwlock->state = -1;
OpenPOWER on IntegriCloud