From 5bcaa25c020bec0d42b78fad01418110f6387d63 Mon Sep 17 00:00:00 2001 From: Nekotekina Date: Fri, 20 Nov 2020 08:40:49 +0300 Subject: [PATCH] CPU: remove descheduled threads from suspend_all list --- rpcs3/Emu/Cell/lv2/lv2.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/rpcs3/Emu/Cell/lv2/lv2.cpp b/rpcs3/Emu/Cell/lv2/lv2.cpp index 974a376d76..b3a5f639a3 100644 --- a/rpcs3/Emu/Cell/lv2/lv2.cpp +++ b/rpcs3/Emu/Cell/lv2/lv2.cpp @@ -1115,9 +1115,15 @@ DECLARE(lv2_obj::g_waiting); thread_local DECLARE(lv2_obj::g_to_awake); +namespace cpu_counter +{ + void remove(cpu_thread*) noexcept; +} + void lv2_obj::sleep(cpu_thread& cpu, const u64 timeout) { vm::temporary_unlock(cpu); + cpu_counter::remove(&cpu); std::lock_guard{g_mutex}, sleep_unlocked(cpu, timeout); g_to_awake.clear(); }