From e7e939104bb167babec7b5f7d5d8390c85f3cbf4 Mon Sep 17 00:00:00 2001 From: Lioncash Date: Tue, 26 Nov 2019 18:34:30 -0500 Subject: core/memory; Migrate over SetCurrentPageTable() to the Memory class Now that literally every other API function is converted over to the Memory class, we can just move the file-local page table into the Memory implementation class, finally getting rid of global state within the memory code. --- src/core/memory.h | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'src/core/memory.h') diff --git a/src/core/memory.h b/src/core/memory.h index 7878f3fb1..1428a6d60 100644 --- a/src/core/memory.h +++ b/src/core/memory.h @@ -58,6 +58,13 @@ public: Memory(Memory&&) = default; Memory& operator=(Memory&&) = default; + /** + * Changes the currently active page table to that of the given process instance. + * + * @param process The process to use the page table of. + */ + void SetCurrentPageTable(Kernel::Process& process); + /** * Maps an allocated buffer onto a region of the emulated process address space. * @@ -401,10 +408,6 @@ private: std::unique_ptr impl; }; -/// Changes the currently active page table to that of -/// the given process instance. -void SetCurrentPageTable(Kernel::Process& process); - /// Determines if the given VAddr is a kernel address bool IsKernelVirtualAddress(VAddr vaddr); -- cgit v1.2.3