mirror of
https://sourceware.org/git/glibc.git
synced 2025-12-24 17:51:17 +03:00
Update.
* mutex.c (__pthread_mutex_unlock): For PTHREAD_MUTEX_RECURSIVE_NP test for owner first. Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user