LV2: Move nearly all notifications out of all mutex scopes including IDM

This commit is contained in:
Eladash 2022-08-04 13:13:51 +03:00 committed by Ivan
parent b55a052a22
commit 34bae90820
19 changed files with 181 additions and 151 deletions

View file

@ -382,11 +382,16 @@ namespace vm
void temporary_unlock(cpu_thread& cpu) noexcept
{
if (!(cpu.state & cpu_flag::wait)) cpu.state += cpu_flag::wait;
bs_t<cpu_flag> add_state = cpu_flag::wait;
if (g_tls_locked && g_tls_locked->compare_and_swap_test(&cpu, nullptr))
{
cpu.state += cpu_flag::memory;
add_state += cpu_flag::memory;
}
if (add_state - cpu.state)
{
cpu.state += add_state;
}
}