Author: jasone Date: Sat May 13 17:49:53 2017 New Revision: 318254 URL: https://svnweb.freebsd.org/changeset/base/318254
Log: 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 Modified: head/lib/libthr/thread/thr_mutex.c Modified: head/lib/libthr/thread/thr_mutex.c ============================================================================== --- head/lib/libthr/thread/thr_mutex.c Sat May 13 13:03:20 2017 (r318253) +++ head/lib/libthr/thread/thr_mutex.c Sat May 13 17:49:53 2017 (r318254) @@ -631,7 +631,7 @@ __pthread_mutex_trylock(pthread_mutex_t } /* 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); _______________________________________________ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"