Skip to content

Commit

Permalink
fixed_typemap.hpp: return reference
Browse files Browse the repository at this point in the history
  • Loading branch information
Nekotekina committed Mar 2, 2021
1 parent bbf52f3 commit ea5e837
Show file tree
Hide file tree
Showing 87 changed files with 3,029 additions and 2,998 deletions.
12 changes: 6 additions & 6 deletions Utilities/Thread.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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)
{
Expand Down Expand Up @@ -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",
Expand Down
8 changes: 4 additions & 4 deletions rpcs3/Emu/CPU/CPUThread.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -444,14 +444,14 @@ void cpu_thread::operator()()
{
case 1:
{
//g_fxo->get<cpu_profiler>()->registered.push(id);
//g_fxo->get<cpu_profiler>().registered.push(id);
break;
}
case 2:
{
if (g_cfg.core.spu_prof)
{
g_fxo->get<cpu_profiler>()->registered.push(id);
g_fxo->get<cpu_profiler>().registered.push(id);
}

break;
Expand Down Expand Up @@ -763,7 +763,7 @@ bool cpu_thread::check_state() noexcept
{
if (state0 & cpu_flag::dbg_pause)
{
g_fxo->get<gdb_server>()->pause_from(this);
g_fxo->get<gdb_server>().pause_from(this);
}

cpu_wait(state1);
Expand Down Expand Up @@ -1159,6 +1159,6 @@ void cpu_thread::flush_profilers() noexcept

if (g_cfg.core.spu_prof || false)
{
g_fxo->get<cpu_profiler>()->registered.push(0);
g_fxo->get<cpu_profiler>().registered.push(0);
}
}

0 comments on commit ea5e837

Please sign in to comment.