MFC r318254:
Fix __pthread_mutex_trylock() to call THR_CRITICAL_LEAVE() on failure rather than on success. This regression was introduced by r300043 (Add implementation of robust mutexes...).
This commit is contained in:
parent
c95ad43c19
commit
e01ea25be5
@ -631,7 +631,7 @@ __pthread_mutex_trylock(pthread_mutex_t *mutex)
|
||||
} /* else {} */
|
||||
if (robust)
|
||||
_mutex_leave_robust(curthread, m);
|
||||
if ((ret == 0 || ret == EOWNERDEAD) &&
|
||||
if (ret != 0 && ret != EOWNERDEAD &&
|
||||
(m->m_flags & PMUTEX_FLAG_PRIVATE) != 0)
|
||||
THR_CRITICAL_LEAVE(curthread);
|
||||
return (ret);
|
||||
|
Loading…
x
Reference in New Issue
Block a user