LV2: Minor optimization regarding signal flag

This commit is contained in:
Eladash 2022-07-21 16:53:49 +03:00 committed by Ivan
parent dc851a729e
commit 2eebbd307d
11 changed files with 24 additions and 26 deletions

View file

@ -191,9 +191,9 @@ error_code sys_event_flag_wait(ppu_thread& ppu, u32 id, u64 bitptn, u32 mode, vm
return CELL_OK;
}
while (auto state = ppu.state.fetch_sub(cpu_flag::signal))
while (auto state = +ppu.state)
{
if (state & cpu_flag::signal)
if (state & cpu_flag::signal && ppu.state.test_and_reset(cpu_flag::signal))
{
break;
}