mirror of
https://github.com/libretro/RetroArch
synced 2025-04-10 06:44:27 +00:00
Fix race between writing ->thread_inited and ->alive.
This commit is contained in:
parent
9c9e26d70c
commit
61bfe0d1af
@ -1041,9 +1041,11 @@ static void rarch_main_data_thread_init(void)
|
|||||||
if (!runloop->thread)
|
if (!runloop->thread)
|
||||||
goto error;
|
goto error;
|
||||||
|
|
||||||
|
slock_lock(runloop->lock);
|
||||||
runloop->thread_inited = true;
|
runloop->thread_inited = true;
|
||||||
runloop->alive = true;
|
runloop->alive = true;
|
||||||
runloop->thread_code = THREAD_CODE_ALIVE;
|
runloop->thread_code = THREAD_CODE_ALIVE;
|
||||||
|
slock_unlock(runloop->lock);
|
||||||
|
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user