From 7ff4509858ecb71513a70116898b1d2df81c8064 Mon Sep 17 00:00:00 2001 From: Eladash Date: Thu, 11 Aug 2022 10:17:29 +0300 Subject: [PATCH] sys_lwcond: Fix a loose notification in cond wait --- rpcs3/Emu/Cell/lv2/sys_lwcond.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/rpcs3/Emu/Cell/lv2/sys_lwcond.cpp b/rpcs3/Emu/Cell/lv2/sys_lwcond.cpp index 9d1fa3ddb3..7494499844 100644 --- a/rpcs3/Emu/Cell/lv2/sys_lwcond.cpp +++ b/rpcs3/Emu/Cell/lv2/sys_lwcond.cpp @@ -368,11 +368,13 @@ error_code _sys_lwcond_queue_wait(ppu_thread& ppu, u32 lwcond_id, u32 lwmutex_id return; } + // Put the current thread to sleep and schedule lwmutex waiter atomically cond.append(cpu); + cond.sleep(ppu, timeout); + return; } } - // Sleep current thread and schedule lwmutex waiter cond.sleep(ppu, timeout); });