From 478ae0715e9c7e84c852f887b4a8408da1b0558a Mon Sep 17 00:00:00 2001 From: Eladash Date: Wed, 3 Feb 2021 13:20:25 +0200 Subject: [PATCH] Tiny fix for zombie PPU threads --- rpcs3/Emu/Cell/lv2/sys_ppu_thread.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/rpcs3/Emu/Cell/lv2/sys_ppu_thread.cpp b/rpcs3/Emu/Cell/lv2/sys_ppu_thread.cpp index bd5770640c..a0e22601d2 100644 --- a/rpcs3/Emu/Cell/lv2/sys_ppu_thread.cpp +++ b/rpcs3/Emu/Cell/lv2/sys_ppu_thread.cpp @@ -69,8 +69,6 @@ void _sys_ppu_thread_exit(ppu_thread& ppu, u64 errorcode) sys_ppu_thread.trace("_sys_ppu_thread_exit(errorcode=0x%llx)", errorcode); - ppu.state += cpu_flag::exit; - ppu_join_status old_status; { std::lock_guard lock(id_manager::g_mutex); @@ -103,7 +101,7 @@ void _sys_ppu_thread_exit(ppu_thread& ppu, u64 errorcode) g_fxo->get()->clean(old_status == ppu_join_status::detached ? ppu.id : 0); - if (old_status == ppu_join_status::joinable) + while (ppu.joiner == ppu_join_status::zombie && !ppu.is_stopped()) { // Wait for termination thread_ctrl::wait_on(ppu.joiner, ppu_join_status::zombie);