fixed_typemap.hpp: return reference

This commit is contained in:
Nekotekina 2021-03-02 14:59:19 +03:00
parent bbf52f3cea
commit ea5e837bd6
87 changed files with 3028 additions and 2997 deletions

View file

@ -1423,13 +1423,13 @@ bool handle_access_violation(u32 addr, bool is_writing, x64_context* context) no
vm::temporary_unlock(*cpu);
u32 pf_port_id = 0;
if (auto pf_entries = g_fxo->get<page_fault_notification_entries>(); true)
if (auto& pf_entries = g_fxo->get<page_fault_notification_entries>(); true)
{
if (auto mem = vm::get(vm::any, addr))
{
reader_lock lock(pf_entries->mutex);
reader_lock lock(pf_entries.mutex);
for (const auto& entry : pf_entries->entries)
for (const auto& entry : pf_entries.entries)
{
if (entry.start_addr == mem->addr)
{
@ -1489,10 +1489,10 @@ bool handle_access_violation(u32 addr, bool is_writing, x64_context* context) no
// 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 = g_fxo->get<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(cpu, addr);
std::lock_guard pf_lock(pf_events.pf_mutex);
pf_events.events.emplace(cpu, addr);
}
sig_log.warning("Page_fault %s location 0x%x because of %s memory", is_writing ? "writing" : "reading",