mirror of
https://github.com/Atmosphere-NX/Atmosphere.git
synced 2025-05-13 22:54:24 -04:00
kern: implement KUnsafeMemory
This commit is contained in:
parent
7bc0250cea
commit
970b85bf9a
4 changed files with 86 additions and 0 deletions
|
@ -35,6 +35,7 @@ namespace ams::kern {
|
|||
class KMemoryBlockSlabManager;
|
||||
class KBlockInfoManager;
|
||||
class KSynchronization;
|
||||
class KUnsafeMemory;
|
||||
|
||||
|
||||
|
||||
|
@ -72,6 +73,7 @@ namespace ams::kern {
|
|||
static KBlockInfoManager s_block_info_manager;
|
||||
static KSupervisorPageTable s_supervisor_page_table;
|
||||
static KSynchronization s_synchronization;
|
||||
static KUnsafeMemory s_unsafe_memory;
|
||||
static KWorkerTaskManager s_worker_task_managers[KWorkerTaskManager::WorkerType_Count];
|
||||
private:
|
||||
static ALWAYS_INLINE KCoreLocalContext &GetCoreLocalContext() {
|
||||
|
@ -144,6 +146,10 @@ namespace ams::kern {
|
|||
return s_synchronization;
|
||||
}
|
||||
|
||||
static ALWAYS_INLINE KUnsafeMemory &GetUnsafeMemory() {
|
||||
return s_unsafe_memory;
|
||||
}
|
||||
|
||||
static ALWAYS_INLINE KWorkerTaskManager &GetWorkerTaskManager(KWorkerTaskManager::WorkerType type) {
|
||||
MESOSPHERE_ASSERT(type <= KWorkerTaskManager::WorkerType_Count);
|
||||
return s_worker_task_managers[type];
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue