mirror of
https://github.com/RPCS3/rpcs3.git
synced 2024-11-25 20:22:30 +01:00
CPUThread: Prevent recursive check_state calls
This commit is contained in:
parent
975aae1d13
commit
ddec5d6908
@ -469,7 +469,7 @@ void cpu_thread::operator()()
|
||||
cpu_thread* _cpu = get_current_cpu_thread();
|
||||
|
||||
// Wait flag isn't set asynchronously so this should be thread-safe
|
||||
if (progress == 0 && cpu_flag::wait - _cpu->state)
|
||||
if (progress == 0 && _cpu->state.none_of(cpu_flag::wait + cpu_flag::temp))
|
||||
{
|
||||
// Operation just started and syscall is imminent
|
||||
_cpu->state += cpu_flag::wait + cpu_flag::temp;
|
||||
@ -739,7 +739,7 @@ bool cpu_thread::check_state() noexcept
|
||||
cpu_counter::add(this);
|
||||
}
|
||||
|
||||
if (state & cpu_flag::pending)
|
||||
if ((state0 & (cpu_flag::pending + cpu_flag::temp)) == cpu_flag::pending)
|
||||
{
|
||||
// Execute pending work
|
||||
cpu_work();
|
||||
|
@ -3172,7 +3172,7 @@ bool spu_thread::process_mfc_cmd()
|
||||
mfc_last_timestamp = 0;
|
||||
|
||||
// Process MFC commands
|
||||
if (!test_stopped())
|
||||
if (test_stopped())
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user