CPU preemption control: remove yield before thread stop

This commit is contained in:
Eladash 2022-09-14 22:59:59 +03:00 committed by Ivan
parent b6d3fa8c66
commit fc331da883

View File

@ -783,9 +783,12 @@ bool cpu_thread::check_state() noexcept
{
if (cpu_flag::wait - state0)
{
// Yield itself
escape = false;
state0 += cpu_flag::yield;
if (!escape || !retval)
{
// Yield itself
state0 += cpu_flag::yield;
escape = false;
}
}
if (const u128 bits = s_cpu_bits)