diff options
| author | 2023-02-16 23:16:08 -0500 | |
|---|---|---|
| committer | 2023-02-17 09:16:05 -0500 | |
| commit | 1773a1039f7422df4faac08aa366b6a6bbd645e4 (patch) | |
| tree | 9560360871f1fcd6c12df2e77452cf37658309d3 /src/core/hle/kernel/kernel.cpp | |
| parent | Merge pull request #9802 from Kelebek1/wait_data_cache (diff) | |
| download | yuzu-1773a1039f7422df4faac08aa366b6a6bbd645e4.tar.gz yuzu-1773a1039f7422df4faac08aa366b6a6bbd645e4.tar.xz yuzu-1773a1039f7422df4faac08aa366b6a6bbd645e4.zip | |
kernel: add KObjectName
Diffstat (limited to 'src/core/hle/kernel/kernel.cpp')
| -rw-r--r-- | src/core/hle/kernel/kernel.cpp | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/core/hle/kernel/kernel.cpp b/src/core/hle/kernel/kernel.cpp index b1922659d..3a68a5633 100644 --- a/src/core/hle/kernel/kernel.cpp +++ b/src/core/hle/kernel/kernel.cpp | |||
| @@ -29,6 +29,7 @@ | |||
| 29 | #include "core/hle/kernel/k_hardware_timer.h" | 29 | #include "core/hle/kernel/k_hardware_timer.h" |
| 30 | #include "core/hle/kernel/k_memory_layout.h" | 30 | #include "core/hle/kernel/k_memory_layout.h" |
| 31 | #include "core/hle/kernel/k_memory_manager.h" | 31 | #include "core/hle/kernel/k_memory_manager.h" |
| 32 | #include "core/hle/kernel/k_object_name.h" | ||
| 32 | #include "core/hle/kernel/k_page_buffer.h" | 33 | #include "core/hle/kernel/k_page_buffer.h" |
| 33 | #include "core/hle/kernel/k_process.h" | 34 | #include "core/hle/kernel/k_process.h" |
| 34 | #include "core/hle/kernel/k_resource_limit.h" | 35 | #include "core/hle/kernel/k_resource_limit.h" |
| @@ -84,6 +85,7 @@ struct KernelCore::Impl { | |||
| 84 | InitializeShutdownThreads(); | 85 | InitializeShutdownThreads(); |
| 85 | InitializePhysicalCores(); | 86 | InitializePhysicalCores(); |
| 86 | InitializePreemption(kernel); | 87 | InitializePreemption(kernel); |
| 88 | InitializeGlobalData(kernel); | ||
| 87 | 89 | ||
| 88 | // Initialize the Dynamic Slab Heaps. | 90 | // Initialize the Dynamic Slab Heaps. |
| 89 | { | 91 | { |
| @@ -194,6 +196,8 @@ struct KernelCore::Impl { | |||
| 194 | } | 196 | } |
| 195 | } | 197 | } |
| 196 | 198 | ||
| 199 | object_name_global_data.reset(); | ||
| 200 | |||
| 197 | // Ensure that the object list container is finalized and properly shutdown. | 201 | // Ensure that the object list container is finalized and properly shutdown. |
| 198 | global_object_list_container->Finalize(); | 202 | global_object_list_container->Finalize(); |
| 199 | global_object_list_container.reset(); | 203 | global_object_list_container.reset(); |
| @@ -363,6 +367,10 @@ struct KernelCore::Impl { | |||
| 363 | } | 367 | } |
| 364 | } | 368 | } |
| 365 | 369 | ||
| 370 | void InitializeGlobalData(KernelCore& kernel) { | ||
| 371 | object_name_global_data = std::make_unique<KObjectNameGlobalData>(kernel); | ||
| 372 | } | ||
| 373 | |||
| 366 | void MakeApplicationProcess(KProcess* process) { | 374 | void MakeApplicationProcess(KProcess* process) { |
| 367 | application_process = process; | 375 | application_process = process; |
| 368 | } | 376 | } |
| @@ -838,6 +846,8 @@ struct KernelCore::Impl { | |||
| 838 | 846 | ||
| 839 | std::unique_ptr<KAutoObjectWithListContainer> global_object_list_container; | 847 | std::unique_ptr<KAutoObjectWithListContainer> global_object_list_container; |
| 840 | 848 | ||
| 849 | std::unique_ptr<KObjectNameGlobalData> object_name_global_data; | ||
| 850 | |||
| 841 | /// Map of named ports managed by the kernel, which can be retrieved using | 851 | /// Map of named ports managed by the kernel, which can be retrieved using |
| 842 | /// the ConnectToPort SVC. | 852 | /// the ConnectToPort SVC. |
| 843 | std::unordered_map<std::string, ServiceInterfaceFactory> service_interface_factory; | 853 | std::unordered_map<std::string, ServiceInterfaceFactory> service_interface_factory; |
| @@ -1138,6 +1148,10 @@ void KernelCore::SetCurrentEmuThread(KThread* thread) { | |||
| 1138 | impl->SetCurrentEmuThread(thread); | 1148 | impl->SetCurrentEmuThread(thread); |
| 1139 | } | 1149 | } |
| 1140 | 1150 | ||
| 1151 | KObjectNameGlobalData& KernelCore::ObjectNameGlobalData() { | ||
| 1152 | return *impl->object_name_global_data; | ||
| 1153 | } | ||
| 1154 | |||
| 1141 | KMemoryManager& KernelCore::MemoryManager() { | 1155 | KMemoryManager& KernelCore::MemoryManager() { |
| 1142 | return *impl->memory_manager; | 1156 | return *impl->memory_manager; |
| 1143 | } | 1157 | } |