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...). MFC after: 1 day
This commit is contained in:
parent
2438ef7673
commit
c45e7190ab
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=318254
@ -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…
Reference in New Issue
Block a user