mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-02-06 00:40:11 +00:00
Fixes suspend+stop threads not stopping
This commit is contained in:
parent
6e89e4ebbf
commit
05813c7e90
@ -229,15 +229,15 @@ bool cpu_thread::check_state() noexcept
|
|||||||
|
|
||||||
const auto [state0, escape] = state.fetch_op([&](bs_t<cpu_flag>& flags)
|
const auto [state0, escape] = state.fetch_op([&](bs_t<cpu_flag>& flags)
|
||||||
{
|
{
|
||||||
// Check pause flags which hold thread inside check_state
|
|
||||||
if (flags & (cpu_flag::pause + cpu_flag::suspend + cpu_flag::dbg_global_pause + cpu_flag::dbg_pause))
|
|
||||||
{
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Atomically clean wait flag and escape
|
// Atomically clean wait flag and escape
|
||||||
if (!(flags & (cpu_flag::exit + cpu_flag::jit_return + cpu_flag::dbg_global_stop + cpu_flag::ret + cpu_flag::stop)))
|
if (!(flags & (cpu_flag::exit + cpu_flag::jit_return + cpu_flag::dbg_global_stop + cpu_flag::ret + cpu_flag::stop)))
|
||||||
{
|
{
|
||||||
|
// Check pause flags which hold thread inside check_state
|
||||||
|
if (flags & (cpu_flag::pause + cpu_flag::suspend + cpu_flag::dbg_global_pause + cpu_flag::dbg_pause))
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
flags -= cpu_flag::wait;
|
flags -= cpu_flag::wait;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user