mirror of
https://github.com/RPCS3/rpcs3.git
synced 2024-11-17 08:11:51 +00:00
Use g_fxo for page_fault_event_entries
This commit is contained in:
parent
606601441d
commit
a85a8796d3
@ -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<page_fault_event_entries>();
|
||||
auto pf_events = g_fxo->get<page_fault_event_entries>();
|
||||
{
|
||||
std::lock_guard pf_lock(pf_events->pf_mutex);
|
||||
pf_events->events.emplace(static_cast<u32>(data2), addr);
|
||||
|
@ -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<page_fault_event_entries>();
|
||||
auto pf_events = g_fxo->get<page_fault_event_entries>();
|
||||
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<page_fault_event_entries>();
|
||||
auto pf_events = g_fxo->get<page_fault_event_entries>();
|
||||
{
|
||||
std::lock_guard pf_lock(pf_events->pf_mutex);
|
||||
auto pf_event_ind = pf_events->events.find(id);
|
||||
|
@ -452,7 +452,7 @@ error_code sys_ppu_thread_get_page_fault_context(u32 thread_id, vm::ptr<sys_ppu_
|
||||
}
|
||||
|
||||
// We can only get a context if the thread is being suspended for a page fault.
|
||||
auto pf_events = fxm::get_always<page_fault_event_entries>();
|
||||
auto pf_events = g_fxo->get<page_fault_event_entries>();
|
||||
std::shared_lock lock(pf_events->pf_mutex);
|
||||
|
||||
const auto evt = pf_events->events.find(thread_id);
|
||||
|
Loading…
Reference in New Issue
Block a user