Adaptive mutexes should have the same deadlock detection properties that

default (errorcheck) mutexes do.

Noticed by:          davidxu
This commit is contained in:
Kris Kennaway 2007-10-30 09:24:23 +00:00
parent 7416cdabcd
commit 83941f797f

View File

@ -550,6 +550,7 @@ mutex_self_lock(pthread_mutex_t m, const struct timespec *abstime)
switch (m->m_type) {
case PTHREAD_MUTEX_ERRORCHECK:
case PTHREAD_MUTEX_ADAPTIVE_NP:
if (abstime) {
clock_gettime(CLOCK_REALTIME, &ts1);
TIMESPEC_SUB(&ts2, abstime, &ts1);