Savestates/LV2: Fix race on _sys_lwcond_queue_wait saving

cpu_flag::again modification requires exclusive access.
This commit is contained in:
Eladash 2022-08-08 22:16:23 +03:00 committed by Ivan
parent bc8bf2c329
commit 9b0d33048c

View File

@ -395,8 +395,7 @@ error_code _sys_lwcond_queue_wait(ppu_thread& ppu, u32 lwcond_id, u32 lwmutex_id
if (is_stopped(state))
{
reader_lock lock(cond->mutex);
reader_lock lock2(mutex->mutex);
std::scoped_lock lock(cond->mutex, mutex->mutex);
bool mutex_sleep = false;
bool cond_sleep = false;