summaryrefslogtreecommitdiff
path: root/lib/libc_r/uthread
diff options
context:
space:
mode:
authorDavid Leonard <d@cvs.openbsd.org>1998-12-18 14:34:32 +0000
committerDavid Leonard <d@cvs.openbsd.org>1998-12-18 14:34:32 +0000
commit7df8c9acc54a7cfca1717223b1b64193c316b1f0 (patch)
treee741156d5c732f763e7d753e19d32ae30438a2ea /lib/libc_r/uthread
parent948057573f78d16f1be78c2d578aa5cb0fca9a45 (diff)
comply with posix when double-unlocking a mutex
Diffstat (limited to 'lib/libc_r/uthread')
-rw-r--r--lib/libc_r/uthread/uthread_mutex.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/libc_r/uthread/uthread_mutex.c b/lib/libc_r/uthread/uthread_mutex.c
index d3801f1750c..062c5d7896b 100644
--- a/lib/libc_r/uthread/uthread_mutex.c
+++ b/lib/libc_r/uthread/uthread_mutex.c
@@ -360,8 +360,8 @@ pthread_mutex_unlock(pthread_mutex_t * mutex)
case PTHREAD_MUTEX_ERRORCHECK:
/* Check if the running thread is not the owner of the mutex: */
if ((*mutex)->m_owner != _thread_run) {
- /* Return an invalid argument error: */
- ret = (*mutex)->m_owner ? EPERM : EINVAL;
+ /* This thread doesn't have permission: */
+ ret = EPERM;
}
/*
* Get the next thread from the queue of threads waiting on