diff options
| author | 2019-11-26 18:34:30 -0500 | |
|---|---|---|
| committer | 2019-11-26 21:55:39 -0500 | |
| commit | e7e939104bb167babec7b5f7d5d8390c85f3cbf4 (patch) | |
| tree | 47b61e77bf8e0e6798b58716d38679a285e3604b /src/core/memory.h | |
| parent | core/memory: Migrate over GetPointerFromVMA() to the Memory class (diff) | |
| download | yuzu-e7e939104bb167babec7b5f7d5d8390c85f3cbf4.tar.gz yuzu-e7e939104bb167babec7b5f7d5d8390c85f3cbf4.tar.xz yuzu-e7e939104bb167babec7b5f7d5d8390c85f3cbf4.zip | |
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.
Diffstat (limited to 'src/core/memory.h')
| -rw-r--r-- | src/core/memory.h | 11 |
1 files changed, 7 insertions, 4 deletions
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 | |||
| @@ -59,6 +59,13 @@ public: | |||
| 59 | Memory& operator=(Memory&&) = default; | 59 | Memory& operator=(Memory&&) = default; |
| 60 | 60 | ||
| 61 | /** | 61 | /** |
| 62 | * Changes the currently active page table to that of the given process instance. | ||
| 63 | * | ||
| 64 | * @param process The process to use the page table of. | ||
| 65 | */ | ||
| 66 | void SetCurrentPageTable(Kernel::Process& process); | ||
| 67 | |||
| 68 | /** | ||
| 62 | * Maps an allocated buffer onto a region of the emulated process address space. | 69 | * Maps an allocated buffer onto a region of the emulated process address space. |
| 63 | * | 70 | * |
| 64 | * @param page_table The page table of the emulated process. | 71 | * @param page_table The page table of the emulated process. |
| @@ -401,10 +408,6 @@ private: | |||
| 401 | std::unique_ptr<Impl> impl; | 408 | std::unique_ptr<Impl> impl; |
| 402 | }; | 409 | }; |
| 403 | 410 | ||
| 404 | /// Changes the currently active page table to that of | ||
| 405 | /// the given process instance. | ||
| 406 | void SetCurrentPageTable(Kernel::Process& process); | ||
| 407 | |||
| 408 | /// Determines if the given VAddr is a kernel address | 411 | /// Determines if the given VAddr is a kernel address |
| 409 | bool IsKernelVirtualAddress(VAddr vaddr); | 412 | bool IsKernelVirtualAddress(VAddr vaddr); |
| 410 | 413 | ||