mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-07-06 15:01:28 +12:00
CPUThread: Prevent recursive check_state calls
This commit is contained in:
parent
975aae1d13
commit
ddec5d6908
2 changed files with 3 additions and 3 deletions
|
@ -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();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue