diff --git a/rpcs3/Emu/CPU/CPUThread.cpp b/rpcs3/Emu/CPU/CPUThread.cpp index 37eeeb4633..2829727019 100644 --- a/rpcs3/Emu/CPU/CPUThread.cpp +++ b/rpcs3/Emu/CPU/CPUThread.cpp @@ -229,11 +229,6 @@ bool cpu_thread::check_state() noexcept return true; } - if (state & cpu_flag::signal && state.test_and_reset(cpu_flag::signal)) - { - cpu_sleep_called = false; - } - const auto [state0, escape] = state.fetch_op([&](bs_t& flags) { // Atomically clean wait flag and escape @@ -251,6 +246,11 @@ bool cpu_thread::check_state() noexcept return true; }); + if (state & cpu_flag::signal && state.test_and_reset(cpu_flag::signal)) + { + cpu_sleep_called = false; + } + if (escape) { if (cpu_flag_memory)