atomic.cpp/threads: remove old wait callback

Add new wait callback which simply collects statistics.
Shift workarounds towards actual problem detection.
This commit is contained in:
Nekotekina 2020-11-13 19:06:44 +03:00
parent 3ac819ee70
commit badb3dc2dd
7 changed files with 124 additions and 118 deletions

View file

@ -4385,8 +4385,12 @@ bool spu_thread::stop_and_signal(u32 code)
return true;
});
if (thread.get() != this)
thread_ctrl::raw_notify(*thread);
while (thread.get() != this && thread->state & cpu_flag::wait)
{
// TODO: replace with proper solution
if (atomic_wait_engine::raw_notify(nullptr, thread_ctrl::get_native_id(*thread)))
break;
}
}
}