Use g_fxo for page_fault_notification_entries

This commit is contained in:
Nekotekina 2019-08-21 22:27:01 +03:00
parent 54952f6ad6
commit 2740fafa64
2 changed files with 3 additions and 3 deletions

View File

@ -1287,7 +1287,7 @@ bool handle_access_violation(u32 addr, bool is_writing, x64_context* context)
{ {
u32 pf_port_id = 0; u32 pf_port_id = 0;
if (auto pf_entries = fxm::get<page_fault_notification_entries>()) if (auto pf_entries = g_fxo->get<page_fault_notification_entries>(); true)
{ {
if (auto mem = vm::get(vm::any, addr)) if (auto mem = vm::get(vm::any, addr))
{ {

View File

@ -236,7 +236,7 @@ error_code sys_mmapper_free_address(ppu_thread& ppu, u32 addr)
} }
// If a memory block is freed, remove it from page notification table. // If a memory block is freed, remove it from page notification table.
auto pf_entries = fxm::get_always<page_fault_notification_entries>(); auto pf_entries = g_fxo->get<page_fault_notification_entries>();
std::lock_guard lock(pf_entries->mutex); std::lock_guard lock(pf_entries->mutex);
auto ind_to_remove = pf_entries->entries.begin(); auto ind_to_remove = pf_entries->entries.begin();
@ -465,7 +465,7 @@ error_code sys_mmapper_enable_page_fault_notification(ppu_thread& ppu, u32 start
return CELL_EAGAIN; return CELL_EAGAIN;
} }
auto pf_entries = fxm::get_always<page_fault_notification_entries>(); auto pf_entries = g_fxo->get<page_fault_notification_entries>();
std::unique_lock lock(pf_entries->mutex); std::unique_lock lock(pf_entries->mutex);
// Return error code if page fault notifications are already enabled // Return error code if page fault notifications are already enabled