summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorbunnei <bunneidev@gmail.com>2022-03-12 02:24:37 +0100
committerbunnei <bunneidev@gmail.com>2022-03-15 02:14:54 +0100
commitf7d19298167a719759ca69e79512ccccbbc9cb90 (patch)
treea1f0ad5f70004c0bae8e1f1ff1e65540779ebec9
parentcore: hle: kernel: Remove server session tracking. (diff)
downloadyuzu-f7d19298167a719759ca69e79512ccccbbc9cb90.tar
yuzu-f7d19298167a719759ca69e79512ccccbbc9cb90.tar.gz
yuzu-f7d19298167a719759ca69e79512ccccbbc9cb90.tar.bz2
yuzu-f7d19298167a719759ca69e79512ccccbbc9cb90.tar.lz
yuzu-f7d19298167a719759ca69e79512ccccbbc9cb90.tar.xz
yuzu-f7d19298167a719759ca69e79512ccccbbc9cb90.tar.zst
yuzu-f7d19298167a719759ca69e79512ccccbbc9cb90.zip
-rw-r--r--src/core/hle/kernel/kernel.cpp16
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 {
struct KernelCore::Impl {
explicit Impl(Core::System& system_, KernelCore& kernel_)
- : time_manager{system_}, object_list_container{kernel_},
+ : time_manager{system_},
service_threads_manager{1, "yuzu:ServiceThreadsManager"}, system{system_} {}
void SetMulticore(bool is_multi) {
@@ -60,6 +60,7 @@ struct KernelCore::Impl {
}
void Initialize(KernelCore& kernel) {
+ global_object_list_container = std::make_unique<KAutoObjectWithListContainer>(kernel);
global_scheduler_context = std::make_unique<Kernel::GlobalSchedulerContext>(kernel);
global_handle_table = std::make_unique<Kernel::KHandleTable>(kernel);
global_handle_table->Initialize(KHandleTable::MaxTableSize);
@@ -108,9 +109,6 @@ struct KernelCore::Impl {
server_port->Close();
}
- // Ensure that the object list container is finalized and properly shutdown.
- object_list_container.Finalize();
-
// Ensures all service threads gracefully shutdown.
ClearServiceThreads();
@@ -189,6 +187,10 @@ struct KernelCore::Impl {
registered_objects.clear();
}
}
+
+ // Ensure that the object list container is finalized and properly shutdown.
+ global_object_list_container->Finalize();
+ global_object_list_container.reset();
}
void InitializePhysicalCores() {
@@ -710,7 +712,7 @@ struct KernelCore::Impl {
// stores all the objects in place.
std::unique_ptr<KHandleTable> global_handle_table;
- KAutoObjectWithListContainer object_list_container;
+ std::unique_ptr<KAutoObjectWithListContainer> global_object_list_container;
/// Map of named ports managed by the kernel, which can be retrieved using
/// the ConnectToPort SVC.
@@ -886,11 +888,11 @@ const Core::ExclusiveMonitor& KernelCore::GetExclusiveMonitor() const {
}
KAutoObjectWithListContainer& KernelCore::ObjectListContainer() {
- return impl->object_list_container;
+ return *impl->global_object_list_container;
}
const KAutoObjectWithListContainer& KernelCore::ObjectListContainer() const {
- return impl->object_list_container;
+ return *impl->global_object_list_container;
}
void KernelCore::InvalidateAllInstructionCaches() {