summaryrefslogtreecommitdiff
path: root/src/core/hle/kernel/kernel.h
diff options
context:
space:
mode:
authorGravatar bunnei2021-02-27 12:48:35 -0700
committerGravatar GitHub2021-02-27 12:48:35 -0700
commit09f7c355c6d7e3c7845ba96d9704489d2d5853f4 (patch)
treeb12127263c0e4999f0a6e9edfe7f8f25adef9d37 /src/core/hle/kernel/kernel.h
parentMerge pull request #5944 from Morph1984/gc-vibrations (diff)
parenthle: kernel: Migrate PageHeap/PageTable to KPageHeap/KPageTable. (diff)
downloadyuzu-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/hle/kernel/kernel.h')
-rw-r--r--src/core/hle/kernel/kernel.h44
1 files changed, 21 insertions, 23 deletions
diff --git a/src/core/hle/kernel/kernel.h b/src/core/hle/kernel/kernel.h
index 806a0d986..56906f2da 100644
--- a/src/core/hle/kernel/kernel.h
+++ b/src/core/hle/kernel/kernel.h
@@ -11,7 +11,7 @@
11#include <vector> 11#include <vector>
12#include "core/arm/cpu_interrupt_handler.h" 12#include "core/arm/cpu_interrupt_handler.h"
13#include "core/hardware_properties.h" 13#include "core/hardware_properties.h"
14#include "core/hle/kernel/memory/memory_types.h" 14#include "core/hle/kernel/memory_types.h"
15#include "core/hle/kernel/object.h" 15#include "core/hle/kernel/object.h"
16 16
17namespace Core { 17namespace Core {
@@ -27,25 +27,23 @@ struct EventType;
27 27
28namespace Kernel { 28namespace Kernel {
29 29
30namespace Memory {
31class MemoryManager;
32template <typename T>
33class SlabHeap;
34} // namespace Memory
35
36class ClientPort; 30class ClientPort;
37class GlobalSchedulerContext; 31class GlobalSchedulerContext;
38class HandleTable; 32class HandleTable;
39class PhysicalCore; 33class KMemoryManager;
40class Process;
41class KResourceLimit; 34class KResourceLimit;
42class KScheduler; 35class KScheduler;
43class SharedMemory; 36class KSharedMemory;
37class KThread;
38class PhysicalCore;
39class Process;
44class ServiceThread; 40class ServiceThread;
45class Synchronization; 41class Synchronization;
46class KThread;
47class TimeManager; 42class TimeManager;
48 43
44template <typename T>
45class KSlabHeap;
46
49using EmuThreadHandle = uintptr_t; 47using EmuThreadHandle = uintptr_t;
50constexpr EmuThreadHandle EmuThreadHandleInvalid{}; 48constexpr EmuThreadHandle EmuThreadHandleInvalid{};
51constexpr EmuThreadHandle EmuThreadHandleReserved{1ULL << 63}; 49constexpr EmuThreadHandle EmuThreadHandleReserved{1ULL << 63};
@@ -178,40 +176,40 @@ public:
178 void RegisterHostThread(); 176 void RegisterHostThread();
179 177
180 /// Gets the virtual memory manager for the kernel. 178 /// Gets the virtual memory manager for the kernel.
181 Memory::MemoryManager& MemoryManager(); 179 KMemoryManager& MemoryManager();
182 180
183 /// Gets the virtual memory manager for the kernel. 181 /// Gets the virtual memory manager for the kernel.
184 const Memory::MemoryManager& MemoryManager() const; 182 const KMemoryManager& MemoryManager() const;
185 183
186 /// Gets the slab heap allocated for user space pages. 184 /// Gets the slab heap allocated for user space pages.
187 Memory::SlabHeap<Memory::Page>& GetUserSlabHeapPages(); 185 KSlabHeap<Page>& GetUserSlabHeapPages();
188 186
189 /// Gets the slab heap allocated for user space pages. 187 /// Gets the slab heap allocated for user space pages.
190 const Memory::SlabHeap<Memory::Page>& GetUserSlabHeapPages() const; 188 const KSlabHeap<Page>& GetUserSlabHeapPages() const;
191 189
192 /// Gets the shared memory object for HID services. 190 /// Gets the shared memory object for HID services.
193 Kernel::SharedMemory& GetHidSharedMem(); 191 Kernel::KSharedMemory& GetHidSharedMem();
194 192
195 /// Gets the shared memory object for HID services. 193 /// Gets the shared memory object for HID services.
196 const Kernel::SharedMemory& GetHidSharedMem() const; 194 const Kernel::KSharedMemory& GetHidSharedMem() const;
197 195
198 /// Gets the shared memory object for font services. 196 /// Gets the shared memory object for font services.
199 Kernel::SharedMemory& GetFontSharedMem(); 197 Kernel::KSharedMemory& GetFontSharedMem();
200 198
201 /// Gets the shared memory object for font services. 199 /// Gets the shared memory object for font services.
202 const Kernel::SharedMemory& GetFontSharedMem() const; 200 const Kernel::KSharedMemory& GetFontSharedMem() const;
203 201
204 /// Gets the shared memory object for IRS services. 202 /// Gets the shared memory object for IRS services.
205 Kernel::SharedMemory& GetIrsSharedMem(); 203 Kernel::KSharedMemory& GetIrsSharedMem();
206 204
207 /// Gets the shared memory object for IRS services. 205 /// Gets the shared memory object for IRS services.
208 const Kernel::SharedMemory& GetIrsSharedMem() const; 206 const Kernel::KSharedMemory& GetIrsSharedMem() const;
209 207
210 /// Gets the shared memory object for Time services. 208 /// Gets the shared memory object for Time services.
211 Kernel::SharedMemory& GetTimeSharedMem(); 209 Kernel::KSharedMemory& GetTimeSharedMem();
212 210
213 /// Gets the shared memory object for Time services. 211 /// Gets the shared memory object for Time services.
214 const Kernel::SharedMemory& GetTimeSharedMem() const; 212 const Kernel::KSharedMemory& GetTimeSharedMem() const;
215 213
216 /// Suspend/unsuspend the OS. 214 /// Suspend/unsuspend the OS.
217 void Suspend(bool in_suspention); 215 void Suspend(bool in_suspention);