This commit is contained in:
Mike Makonnen 2004-05-20 11:55:04 +00:00
parent 1df1a82541
commit 7295f69667

View File

@ -379,6 +379,9 @@ mutex_lock_common(pthread_mutex_t * mutex, int nonblock,
goto out;
}
if ((*mutex)->m_type == PTHREAD_MUTEX_RECURSIVE)
(*mutex)->m_data.m_count++;
/*
* The mutex is now owned by curthread.
*/
@ -644,14 +647,9 @@ mutex_self_lock(pthread_mutex_t mutex, int noblock)
PANIC("Shouldn't resume here?\n");
break;
case PTHREAD_MUTEX_RECURSIVE:
/* Increment the lock count: */
mutex->m_data.m_count++;
break;
default:
/* Trap invalid mutex types; */
return (EINVAL);
/* Do Nothing */
break;
}
return (0);
}