diff options
Diffstat (limited to '')
| -rw-r--r-- | src/core/hle/kernel/kernel.cpp | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/src/core/hle/kernel/kernel.cpp b/src/core/hle/kernel/kernel.cpp index bf5e39266..43f94a31d 100644 --- a/src/core/hle/kernel/kernel.cpp +++ b/src/core/hle/kernel/kernel.cpp | |||
| @@ -52,7 +52,7 @@ namespace Kernel { | |||
| 52 | 52 | ||
| 53 | struct KernelCore::Impl { | 53 | struct KernelCore::Impl { |
| 54 | explicit Impl(Core::System& system_, KernelCore& kernel_) | 54 | explicit Impl(Core::System& system_, KernelCore& kernel_) |
| 55 | : time_manager{system_}, object_list_container{kernel_}, | 55 | : time_manager{system_}, |
| 56 | service_threads_manager{1, "yuzu:ServiceThreadsManager"}, system{system_} {} | 56 | service_threads_manager{1, "yuzu:ServiceThreadsManager"}, system{system_} {} |
| 57 | 57 | ||
| 58 | void SetMulticore(bool is_multi) { | 58 | void SetMulticore(bool is_multi) { |
| @@ -60,6 +60,7 @@ struct KernelCore::Impl { | |||
| 60 | } | 60 | } |
| 61 | 61 | ||
| 62 | void Initialize(KernelCore& kernel) { | 62 | void Initialize(KernelCore& kernel) { |
| 63 | global_object_list_container = std::make_unique<KAutoObjectWithListContainer>(kernel); | ||
| 63 | global_scheduler_context = std::make_unique<Kernel::GlobalSchedulerContext>(kernel); | 64 | global_scheduler_context = std::make_unique<Kernel::GlobalSchedulerContext>(kernel); |
| 64 | global_handle_table = std::make_unique<Kernel::KHandleTable>(kernel); | 65 | global_handle_table = std::make_unique<Kernel::KHandleTable>(kernel); |
| 65 | global_handle_table->Initialize(KHandleTable::MaxTableSize); | 66 | global_handle_table->Initialize(KHandleTable::MaxTableSize); |
| @@ -108,9 +109,6 @@ struct KernelCore::Impl { | |||
| 108 | server_port->Close(); | 109 | server_port->Close(); |
| 109 | } | 110 | } |
| 110 | 111 | ||
| 111 | // Ensure that the object list container is finalized and properly shutdown. | ||
| 112 | object_list_container.Finalize(); | ||
| 113 | |||
| 114 | // Ensures all service threads gracefully shutdown. | 112 | // Ensures all service threads gracefully shutdown. |
| 115 | ClearServiceThreads(); | 113 | ClearServiceThreads(); |
| 116 | 114 | ||
| @@ -189,6 +187,10 @@ struct KernelCore::Impl { | |||
| 189 | registered_objects.clear(); | 187 | registered_objects.clear(); |
| 190 | } | 188 | } |
| 191 | } | 189 | } |
| 190 | |||
| 191 | // Ensure that the object list container is finalized and properly shutdown. | ||
| 192 | global_object_list_container->Finalize(); | ||
| 193 | global_object_list_container.reset(); | ||
| 192 | } | 194 | } |
| 193 | 195 | ||
| 194 | void InitializePhysicalCores() { | 196 | void InitializePhysicalCores() { |
| @@ -710,7 +712,7 @@ struct KernelCore::Impl { | |||
| 710 | // stores all the objects in place. | 712 | // stores all the objects in place. |
| 711 | std::unique_ptr<KHandleTable> global_handle_table; | 713 | std::unique_ptr<KHandleTable> global_handle_table; |
| 712 | 714 | ||
| 713 | KAutoObjectWithListContainer object_list_container; | 715 | std::unique_ptr<KAutoObjectWithListContainer> global_object_list_container; |
| 714 | 716 | ||
| 715 | /// Map of named ports managed by the kernel, which can be retrieved using | 717 | /// Map of named ports managed by the kernel, which can be retrieved using |
| 716 | /// the ConnectToPort SVC. | 718 | /// the ConnectToPort SVC. |
| @@ -886,11 +888,11 @@ const Core::ExclusiveMonitor& KernelCore::GetExclusiveMonitor() const { | |||
| 886 | } | 888 | } |
| 887 | 889 | ||
| 888 | KAutoObjectWithListContainer& KernelCore::ObjectListContainer() { | 890 | KAutoObjectWithListContainer& KernelCore::ObjectListContainer() { |
| 889 | return impl->object_list_container; | 891 | return *impl->global_object_list_container; |
| 890 | } | 892 | } |
| 891 | 893 | ||
| 892 | const KAutoObjectWithListContainer& KernelCore::ObjectListContainer() const { | 894 | const KAutoObjectWithListContainer& KernelCore::ObjectListContainer() const { |
| 893 | return impl->object_list_container; | 895 | return *impl->global_object_list_container; |
| 894 | } | 896 | } |
| 895 | 897 | ||
| 896 | void KernelCore::InvalidateAllInstructionCaches() { | 898 | void KernelCore::InvalidateAllInstructionCaches() { |