mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-01-29 09:32:42 +00:00
Remove spin wait loop in cpu_thread::check_state
It was mostly dead code. lock_unlock() method already has spin waiting logic.
This commit is contained in:
parent
0af9685381
commit
798434aada
@ -267,27 +267,6 @@ bool cpu_thread::check_state() noexcept
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (state0 & cpu_flag::wait)
|
|
||||||
{
|
|
||||||
// Spin wait once for a bit before resorting to thread_ctrl::wait
|
|
||||||
for (u32 i = 0; i < 10; i++)
|
|
||||||
{
|
|
||||||
if (state & (cpu_flag::pause + cpu_flag::suspend))
|
|
||||||
{
|
|
||||||
busy_wait(500);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!(state & (cpu_flag::pause + cpu_flag::suspend)))
|
|
||||||
{
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (state0 & (cpu_flag::suspend + cpu_flag::dbg_global_pause + cpu_flag::dbg_pause))
|
if (state0 & (cpu_flag::suspend + cpu_flag::dbg_global_pause + cpu_flag::dbg_pause))
|
||||||
{
|
{
|
||||||
thread_ctrl::wait();
|
thread_ctrl::wait();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user