* Make static initializers sort of work in the test environment.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28511 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
c068350a89
commit
11ab7172d9
@ -1313,6 +1313,11 @@ _mutex_trylock(mutex *mutex)
|
||||
status_t
|
||||
_mutex_lock(mutex *mutex, bool threadsLocked)
|
||||
{
|
||||
if (mutex->waiters == NULL) {
|
||||
// MUTEX_INITIALIZER has been used; this is not thread-safe!
|
||||
mutex_init(mutex, mutex->name);
|
||||
}
|
||||
|
||||
status_t status;
|
||||
do {
|
||||
status = acquire_sem((sem_id)mutex->waiters);
|
||||
|
Loading…
Reference in New Issue
Block a user