From a85a8796d3ee2969b3ee15dd690e13ad0421f420 Mon Sep 17 00:00:00 2001 From: Nekotekina Date: Wed, 21 Aug 2019 20:30:58 +0300 Subject: [PATCH] Use g_fxo for page_fault_event_entries --- Utilities/Thread.cpp | 2 +- rpcs3/Emu/Cell/lv2/sys_mmapper.cpp | 4 ++-- rpcs3/Emu/Cell/lv2/sys_ppu_thread.cpp | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Utilities/Thread.cpp b/Utilities/Thread.cpp index 68b407abd8..0bbed9dddc 100644 --- a/Utilities/Thread.cpp +++ b/Utilities/Thread.cpp @@ -1346,7 +1346,7 @@ bool handle_access_violation(u32 addr, bool is_writing, x64_context* context) // Now, place the page fault event onto table so that other functions [sys_mmapper_free_address and pagefault recovery funcs etc] // know that this thread is page faulted and where. - auto pf_events = fxm::get_always(); + auto pf_events = g_fxo->get(); { std::lock_guard pf_lock(pf_events->pf_mutex); pf_events->events.emplace(static_cast(data2), addr); diff --git a/rpcs3/Emu/Cell/lv2/sys_mmapper.cpp b/rpcs3/Emu/Cell/lv2/sys_mmapper.cpp index ee6edb4901..73c2451f98 100644 --- a/rpcs3/Emu/Cell/lv2/sys_mmapper.cpp +++ b/rpcs3/Emu/Cell/lv2/sys_mmapper.cpp @@ -210,7 +210,7 @@ error_code sys_mmapper_free_address(ppu_thread& ppu, u32 addr) } // If page fault notify exists and an address in this area is faulted, we can't free the memory. - auto pf_events = fxm::get_always(); + auto pf_events = g_fxo->get(); std::lock_guard pf_lock(pf_events->pf_mutex); for (const auto& ev : pf_events->events) @@ -489,7 +489,7 @@ error_code sys_mmapper_enable_page_fault_notification(ppu_thread& ppu, u32 start error_code mmapper_thread_recover_page_fault(u32 id) { // We can only wake a thread if it is being suspended for a page fault. - auto pf_events = fxm::get_always(); + auto pf_events = g_fxo->get(); { std::lock_guard pf_lock(pf_events->pf_mutex); auto pf_event_ind = pf_events->events.find(id); diff --git a/rpcs3/Emu/Cell/lv2/sys_ppu_thread.cpp b/rpcs3/Emu/Cell/lv2/sys_ppu_thread.cpp index d15d9a3351..bd54a6ec8b 100644 --- a/rpcs3/Emu/Cell/lv2/sys_ppu_thread.cpp +++ b/rpcs3/Emu/Cell/lv2/sys_ppu_thread.cpp @@ -452,7 +452,7 @@ error_code sys_ppu_thread_get_page_fault_context(u32 thread_id, vm::ptr(); + auto pf_events = g_fxo->get(); std::shared_lock lock(pf_events->pf_mutex); const auto evt = pf_events->events.find(thread_id);