From f5ee8c129213a151d5b3273a928a14de7719aaf8 Mon Sep 17 00:00:00 2001 From: Nekotekina Date: Sun, 14 Jul 2019 18:08:18 +0300 Subject: [PATCH] sys_interrupt: add vm::temporary_unlock --- rpcs3/Emu/Cell/lv2/sys_interrupt.cpp | 10 ++++++++-- rpcs3/Emu/Cell/lv2/sys_interrupt.h | 4 ++-- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/rpcs3/Emu/Cell/lv2/sys_interrupt.cpp b/rpcs3/Emu/Cell/lv2/sys_interrupt.cpp index 384ef683d7..f03d62d149 100644 --- a/rpcs3/Emu/Cell/lv2/sys_interrupt.cpp +++ b/rpcs3/Emu/Cell/lv2/sys_interrupt.cpp @@ -37,8 +37,10 @@ void lv2_int_serv::join() (*thread)(); } -error_code sys_interrupt_tag_destroy(u32 intrtag) +error_code sys_interrupt_tag_destroy(ppu_thread& ppu, u32 intrtag) { + vm::temporary_unlock(ppu); + sys_interrupt.warning("sys_interrupt_tag_destroy(intrtag=0x%x)", intrtag); const auto tag = idm::withdraw(intrtag, [](lv2_int_tag& tag) -> CellError @@ -64,8 +66,10 @@ error_code sys_interrupt_tag_destroy(u32 intrtag) return CELL_OK; } -error_code _sys_interrupt_thread_establish(vm::ptr ih, u32 intrtag, u32 intrthread, u64 arg1, u64 arg2) +error_code _sys_interrupt_thread_establish(ppu_thread& ppu, vm::ptr ih, u32 intrtag, u32 intrthread, u64 arg1, u64 arg2) { + vm::temporary_unlock(ppu); + sys_interrupt.warning("_sys_interrupt_thread_establish(ih=*0x%x, intrtag=0x%x, intrthread=0x%x, arg1=0x%llx, arg2=0x%llx)", ih, intrtag, intrthread, arg1, arg2); CellError error = CELL_EAGAIN; @@ -124,6 +128,8 @@ error_code _sys_interrupt_thread_establish(vm::ptr ih, u32 intrtag, u32 int error_code _sys_interrupt_thread_disestablish(ppu_thread& ppu, u32 ih, vm::ptr r13) { + vm::temporary_unlock(ppu); + sys_interrupt.warning("_sys_interrupt_thread_disestablish(ih=0x%x, r13=*0x%x)", ih, r13); const auto handler = idm::withdraw(ih); diff --git a/rpcs3/Emu/Cell/lv2/sys_interrupt.h b/rpcs3/Emu/Cell/lv2/sys_interrupt.h index 13f97364f9..2f7fca7180 100644 --- a/rpcs3/Emu/Cell/lv2/sys_interrupt.h +++ b/rpcs3/Emu/Cell/lv2/sys_interrupt.h @@ -34,7 +34,7 @@ struct lv2_int_serv final : lv2_obj // Syscalls -error_code sys_interrupt_tag_destroy(u32 intrtag); -error_code _sys_interrupt_thread_establish(vm::ptr ih, u32 intrtag, u32 intrthread, u64 arg1, u64 arg2); +error_code sys_interrupt_tag_destroy(ppu_thread& ppu, u32 intrtag); +error_code _sys_interrupt_thread_establish(ppu_thread& ppu, vm::ptr ih, u32 intrtag, u32 intrthread, u64 arg1, u64 arg2); error_code _sys_interrupt_thread_disestablish(ppu_thread& ppu, u32 ih, vm::ptr r13); void sys_interrupt_thread_eoi(ppu_thread& ppu);