LV2: Optimizations and fixes

Fix and optimize sys_ppu_thread_yield

Fix LV2 syscalls with timeout bug. (use ppu_thread::cancel_sleep instead)

Move timeout notification out of mutex scope

Allow g_waiting timeouts to be awaked in scope
This commit is contained in:
Elad Ashkenazi 2022-08-08 08:33:49 +03:00 committed by Ivan
parent cba4c3cdc4
commit c4cc0154be
10 changed files with 260 additions and 202 deletions

View file

@ -409,7 +409,7 @@ error_code sys_timer_usleep(ppu_thread& ppu, u64 sleep_time)
{
lv2_obj::sleep(ppu, g_cfg.core.sleep_timers_accuracy < sleep_timers_accuracy_level::_usleep ? sleep_time : 0);
if (!lv2_obj::wait_timeout<true>(sleep_time))
if (!lv2_obj::wait_timeout(sleep_time, &ppu, true, true))
{
ppu.state += cpu_flag::again;
}