LV2: Avoid using multi-variable atomic waiting on cpu_thread::state wait

This commit is contained in:
Eladash 2022-09-20 11:47:05 +03:00 committed by Ivan
parent 2a00a88e2a
commit d25d1ecb3a
16 changed files with 31 additions and 24 deletions

View file

@ -1641,7 +1641,10 @@ void spu_thread::cleanup()
vm::free_range_lock(range_lock);
// Signal the debugger about the termination
state += cpu_flag::exit;
if (!state.test_and_set(cpu_flag::exit))
{
state.notify_one();
}
}
spu_thread::~spu_thread()