mirror of
https://github.com/genodelabs/genode.git
synced 2025-06-19 07:38:28 +00:00
committed by
Christian Helmuth
parent
85a1f91f59
commit
e87d60ddf7
@ -36,10 +36,10 @@ extern int main_thread_futex_counter;
|
||||
static void empty_signal_handler(int) { }
|
||||
|
||||
|
||||
static Lock &startup_lock()
|
||||
static Blockade &startup_lock()
|
||||
{
|
||||
static Lock lock(Lock::LOCKED);
|
||||
return lock;
|
||||
static Blockade blockade;
|
||||
return blockade;
|
||||
}
|
||||
|
||||
|
||||
@ -75,7 +75,7 @@ void Thread::_thread_start()
|
||||
}
|
||||
|
||||
/* wakeup 'start' function */
|
||||
startup_lock().unlock();
|
||||
startup_lock().wakeup();
|
||||
|
||||
thread->entry();
|
||||
|
||||
@ -140,8 +140,8 @@ void Thread::_deinit_platform_thread()
|
||||
void Thread::start()
|
||||
{
|
||||
/* synchronize calls of the 'start' function */
|
||||
static Lock lock;
|
||||
Lock::Guard guard(lock);
|
||||
static Mutex mutex;
|
||||
Mutex::Guard guard(mutex);
|
||||
|
||||
_init_cpu_session_and_trace_control();
|
||||
|
||||
@ -161,7 +161,7 @@ void Thread::start()
|
||||
native_thread().pid = lx_getpid();
|
||||
|
||||
/* wait until the 'thread_start' function got entered */
|
||||
startup_lock().lock();
|
||||
startup_lock().block();
|
||||
}
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user