diff options
author | Ulrich Drepper <drepper@redhat.com> | 2000-09-28 23:11:33 +0000 |
---|---|---|
committer | Ulrich Drepper <drepper@redhat.com> | 2000-09-28 23:11:33 +0000 |
commit | c0ac34e4472e5f3b5fdf1557480e2b2c1cc72aed (patch) | |
tree | 428164e4a1b3ba35e5469c2d21aeb5c84afa8003 /linuxthreads | |
parent | 8cab1d380a9a9743ed825533f389e0edb7b777d0 (diff) | |
download | glibc-c0ac34e4472e5f3b5fdf1557480e2b2c1cc72aed.tar glibc-c0ac34e4472e5f3b5fdf1557480e2b2c1cc72aed.tar.gz glibc-c0ac34e4472e5f3b5fdf1557480e2b2c1cc72aed.tar.bz2 glibc-c0ac34e4472e5f3b5fdf1557480e2b2c1cc72aed.zip |
Update.
* mutex.c (__pthread_mutex_unlock): For PTHREAD_MUTEX_RECURSIVE_NP
test for owner first.
Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
Diffstat (limited to 'linuxthreads')
-rw-r--r-- | linuxthreads/ChangeLog | 4 | ||||
-rw-r--r-- | linuxthreads/mutex.c | 2 |
2 files changed, 6 insertions, 0 deletions
diff --git a/linuxthreads/ChangeLog b/linuxthreads/ChangeLog index 90458288e9..4c281da24a 100644 --- a/linuxthreads/ChangeLog +++ b/linuxthreads/ChangeLog @@ -1,5 +1,9 @@ 2000-09-28 Ulrich Drepper <drepper@redhat.com> + * mutex.c (__pthread_mutex_unlock): For PTHREAD_MUTEX_RECURSIVE_NP + test for owner first. + Patch by Kaz Kylheku <kaz@ashi.footprints.net>. + * cancel.c (pthread_cancel): Don't do anything if cancelation is disabled. diff --git a/linuxthreads/mutex.c b/linuxthreads/mutex.c index 9ce4a30820..9b4a3c7f56 100644 --- a/linuxthreads/mutex.c +++ b/linuxthreads/mutex.c @@ -163,6 +163,8 @@ int __pthread_mutex_unlock(pthread_mutex_t * mutex) __pthread_unlock(&mutex->__m_lock); return 0; case PTHREAD_MUTEX_RECURSIVE_NP: + if (mutex->__m_owner != thread_self()) + return EPERM; if (mutex->__m_count > 0) { mutex->__m_count--; return 0; |