kern: implement KUnsafeMemory
This commit is contained in:
@@ -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];
|
||||
|
||||
Reference in New Issue
Block a user