From 0ec07e8763336c753f934d0176f946da8963e1c8 Mon Sep 17 00:00:00 2001 From: Lioncash Date: Sun, 3 May 2020 12:41:30 -0400 Subject: hle_ipc: Eliminate core memory globals We can just pass the required instances into the constructor of the request, eliminating all usages of the global system accessor. --- src/core/hle/kernel/hle_ipc.h | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'src/core/hle/kernel/hle_ipc.h') diff --git a/src/core/hle/kernel/hle_ipc.h b/src/core/hle/kernel/hle_ipc.h index af3330297..b31673928 100644 --- a/src/core/hle/kernel/hle_ipc.h +++ b/src/core/hle/kernel/hle_ipc.h @@ -19,6 +19,10 @@ union ResultCode; +namespace Core::Memory { +class Memory; +} + namespace Service { class ServiceFrameworkBase; } @@ -28,6 +32,7 @@ namespace Kernel { class Domain; class HandleTable; class HLERequestContext; +class KernelCore; class Process; class ServerSession; class Thread; @@ -98,7 +103,8 @@ protected: */ class HLERequestContext { public: - explicit HLERequestContext(std::shared_ptr session, + explicit HLERequestContext(KernelCore& kernel, Core::Memory::Memory& memory, + std::shared_ptr session, std::shared_ptr thread); ~HLERequestContext(); @@ -305,6 +311,9 @@ private: std::vector> domain_request_handlers; bool is_thread_waiting{}; + + KernelCore& kernel; + Core::Memory::Memory& memory; }; } // namespace Kernel -- cgit v1.2.3