From bb9ae18c71a8dc7103bc4808741b0a39addd1d22 Mon Sep 17 00:00:00 2001 From: Eladash Date: Wed, 20 Jul 2022 15:21:08 +0300 Subject: [PATCH] Savestates: Fix sys_rwlock_wunlock saving --- rpcs3/Emu/Cell/lv2/sys_rwlock.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/rpcs3/Emu/Cell/lv2/sys_rwlock.cpp b/rpcs3/Emu/Cell/lv2/sys_rwlock.cpp index c420374e64..4efadb4590 100644 --- a/rpcs3/Emu/Cell/lv2/sys_rwlock.cpp +++ b/rpcs3/Emu/Cell/lv2/sys_rwlock.cpp @@ -520,6 +520,15 @@ error_code sys_rwlock_wunlock(ppu_thread& ppu, u32 rw_lock_id) } else if (auto readers = rwlock->rq.size()) { + for (auto cpu : rwlock->rq) + { + if (static_cast(cpu)->state & cpu_flag::again) + { + ppu.state += cpu_flag::again; + return {}; + } + } + for (auto cpu : ::as_rvalue(std::move(rwlock->rq))) { rwlock->append(cpu);