Fix race between writing ->thread_inited and ->alive.

This commit is contained in:
Alcaro 2015-05-04 20:33:20 +02:00
parent 9c9e26d70c
commit 61bfe0d1af

View File

@ -1041,9 +1041,11 @@ static void rarch_main_data_thread_init(void)
if (!runloop->thread)
goto error;
slock_lock(runloop->lock);
runloop->thread_inited = true;
runloop->alive = true;
runloop->thread_code = THREAD_CODE_ALIVE;
slock_unlock(runloop->lock);
return;