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:
Nekotekina 2019-09-07 20:44:58 +03:00
parent 0af9685381
commit 798434aada

View File

@ -267,27 +267,6 @@ bool cpu_thread::check_state() noexcept
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))
{
thread_ctrl::wait();