diff options
| author | 2021-02-27 12:48:35 -0700 | |
|---|---|---|
| committer | 2021-02-27 12:48:35 -0700 | |
| commit | 09f7c355c6d7e3c7845ba96d9704489d2d5853f4 (patch) | |
| tree | b12127263c0e4999f0a6e9edfe7f8f25adef9d37 /src/core/memory.h | |
| parent | Merge pull request #5944 from Morph1984/gc-vibrations (diff) | |
| parent | hle: kernel: Migrate PageHeap/PageTable to KPageHeap/KPageTable. (diff) | |
| download | yuzu-09f7c355c6d7e3c7845ba96d9704489d2d5853f4.tar.gz yuzu-09f7c355c6d7e3c7845ba96d9704489d2d5853f4.tar.xz yuzu-09f7c355c6d7e3c7845ba96d9704489d2d5853f4.zip | |
Merge pull request #5953 from bunnei/memory-refactor-1
Kernel Rework: Memory updates and refactoring (Part 1)
Diffstat (limited to 'src/core/memory.h')
| -rw-r--r-- | src/core/memory.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/core/memory.h b/src/core/memory.h index 705ebb23d..6d34fcfe2 100644 --- a/src/core/memory.h +++ b/src/core/memory.h | |||
| @@ -116,6 +116,11 @@ public: | |||
| 116 | */ | 116 | */ |
| 117 | u8* GetPointer(VAddr vaddr); | 117 | u8* GetPointer(VAddr vaddr); |
| 118 | 118 | ||
| 119 | template <typename T> | ||
| 120 | T* GetPointer(VAddr vaddr) { | ||
| 121 | return reinterpret_cast<T*>(GetPointer(vaddr)); | ||
| 122 | } | ||
| 123 | |||
| 119 | /** | 124 | /** |
| 120 | * Gets a pointer to the given address. | 125 | * Gets a pointer to the given address. |
| 121 | * | 126 | * |
| @@ -126,6 +131,11 @@ public: | |||
| 126 | */ | 131 | */ |
| 127 | const u8* GetPointer(VAddr vaddr) const; | 132 | const u8* GetPointer(VAddr vaddr) const; |
| 128 | 133 | ||
| 134 | template <typename T> | ||
| 135 | const T* GetPointer(VAddr vaddr) const { | ||
| 136 | return reinterpret_cast<T*>(GetPointer(vaddr)); | ||
| 137 | } | ||
| 138 | |||
| 129 | /** | 139 | /** |
| 130 | * Reads an 8-bit unsigned value from the current process' address space | 140 | * Reads an 8-bit unsigned value from the current process' address space |
| 131 | * at the given virtual address. | 141 | * at the given virtual address. |