mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-07-07 07:21:25 +12:00
Fixes suspend+stop threads not stopping
This commit is contained in:
parent
6e89e4ebbf
commit
05813c7e90
1 changed files with 6 additions and 6 deletions
|
@ -228,6 +228,9 @@ 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)
|
||||||
|
{
|
||||||
|
// 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)))
|
||||||
{
|
{
|
||||||
// Check pause flags which hold thread inside check_state
|
// 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))
|
if (flags & (cpu_flag::pause + cpu_flag::suspend + cpu_flag::dbg_global_pause + cpu_flag::dbg_pause))
|
||||||
|
@ -235,9 +238,6 @@ bool cpu_thread::check_state() noexcept
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
// 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)))
|
|
||||||
{
|
|
||||||
flags -= cpu_flag::wait;
|
flags -= cpu_flag::wait;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue