SPU/LV2: Fix tiny race conditions

This commit is contained in:
Eladash 2022-09-18 21:19:34 +03:00 committed by Ivan
parent 3581c5b078
commit 194f7375da
18 changed files with 130 additions and 36 deletions

View file

@ -695,7 +695,6 @@ bool cpu_thread::check_state() noexcept
{
// Sticky flag, indicates check_state() is not allowed to return true
flags -= cpu_flag::temp;
flags -= cpu_flag::wait;
cpu_can_stop = false;
store = true;
}
@ -766,9 +765,9 @@ bool cpu_thread::check_state() noexcept
}
else
{
if (cpu_can_stop && !(flags & cpu_flag::wait))
if (flags & cpu_flag::wait)
{
flags += cpu_flag::wait;
flags -= cpu_flag::wait;
store = true;
}