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.
This commit is contained in:
Lioncash 2019-11-26 18:34:30 -05:00
parent 50a518be69
commit e7e939104b
3 changed files with 34 additions and 26 deletions

View file

@ -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> 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);