Skip to content

Commit

Permalink
Fixes suspend+stop threads not stopping
Browse files Browse the repository at this point in the history
  • Loading branch information
RipleyTom authored and Nekotekina committed Aug 4, 2019
1 parent 6e89e4e commit 05813c7
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions rpcs3/Emu/CPU/CPUThread.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -229,15 +229,15 @@ bool cpu_thread::check_state() noexcept

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
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;
}

Expand Down

0 comments on commit 05813c7

Please sign in to comment.