mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-03-16 16:21:02 +00: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();
|
cpu_thread* _cpu = get_current_cpu_thread();
|
||||||
|
|
||||||
// Wait flag isn't set asynchronously so this should be thread-safe
|
// 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
|
// Operation just started and syscall is imminent
|
||||||
_cpu->state += cpu_flag::wait + cpu_flag::temp;
|
_cpu->state += cpu_flag::wait + cpu_flag::temp;
|
||||||
@ -739,7 +739,7 @@ bool cpu_thread::check_state() noexcept
|
|||||||
cpu_counter::add(this);
|
cpu_counter::add(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (state & cpu_flag::pending)
|
if ((state0 & (cpu_flag::pending + cpu_flag::temp)) == cpu_flag::pending)
|
||||||
{
|
{
|
||||||
// Execute pending work
|
// Execute pending work
|
||||||
cpu_work();
|
cpu_work();
|
||||||
|
@ -3172,7 +3172,7 @@ bool spu_thread::process_mfc_cmd()
|
|||||||
mfc_last_timestamp = 0;
|
mfc_last_timestamp = 0;
|
||||||
|
|
||||||
// Process MFC commands
|
// Process MFC commands
|
||||||
if (!test_stopped())
|
if (test_stopped())
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user