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

@ -4860,9 +4860,9 @@ bool spu_thread::stop_and_signal(u32 code)
}
}
while (auto old = state.fetch_sub(cpu_flag::signal))
while (auto old = +state)
{
if (old & cpu_flag::signal)
if (old & cpu_flag::signal && state.test_and_reset(cpu_flag::signal))
{
break;
}