mirror of
https://github.com/RPCS3/rpcs3.git
synced 2024-11-23 03:02:53 +01:00
Optimize cpu check_state() a bit
Move cpu_flag::dbg_pause check from the start. To the moment before it actually goes to sleep.
This commit is contained in:
parent
027eba2b59
commit
dea8aa675a
@ -575,11 +575,6 @@ cpu_thread::cpu_thread(u32 id)
|
||||
|
||||
bool cpu_thread::check_state() noexcept
|
||||
{
|
||||
if (state & cpu_flag::dbg_pause)
|
||||
{
|
||||
g_fxo->get<gdb_server>()->pause_from(this);
|
||||
}
|
||||
|
||||
bool cpu_sleep_called = false;
|
||||
bool cpu_can_stop = true;
|
||||
bool escape, retval;
|
||||
@ -692,6 +687,11 @@ bool cpu_thread::check_state() noexcept
|
||||
|
||||
if (state0 & (cpu_flag::suspend + cpu_flag::dbg_global_pause + cpu_flag::dbg_pause))
|
||||
{
|
||||
if (state0 & cpu_flag::dbg_pause)
|
||||
{
|
||||
g_fxo->get<gdb_server>()->pause_from(this);
|
||||
}
|
||||
|
||||
thread_ctrl::wait();
|
||||
}
|
||||
else
|
||||
|
Loading…
Reference in New Issue
Block a user