diff options
author | bunnei <bunneidev@gmail.com> | 2021-06-08 06:10:51 +0200 |
---|---|---|
committer | bunnei <bunneidev@gmail.com> | 2021-06-08 06:10:51 +0200 |
commit | a493ab2678078ce2066e8120ec93c0f6b4274df6 (patch) | |
tree | 41178195f09f5622246f44311f0b8727240e5624 /src/core/hle/kernel/kernel.cpp | |
parent | Merge pull request #6410 from lat9nq/avoid-oob (diff) | |
download | yuzu-a493ab2678078ce2066e8120ec93c0f6b4274df6.tar yuzu-a493ab2678078ce2066e8120ec93c0f6b4274df6.tar.gz yuzu-a493ab2678078ce2066e8120ec93c0f6b4274df6.tar.bz2 yuzu-a493ab2678078ce2066e8120ec93c0f6b4274df6.tar.lz yuzu-a493ab2678078ce2066e8120ec93c0f6b4274df6.tar.xz yuzu-a493ab2678078ce2066e8120ec93c0f6b4274df6.tar.zst yuzu-a493ab2678078ce2066e8120ec93c0f6b4274df6.zip |
Diffstat (limited to 'src/core/hle/kernel/kernel.cpp')
-rw-r--r-- | src/core/hle/kernel/kernel.cpp | 18 |
1 files changed, 4 insertions, 14 deletions
diff --git a/src/core/hle/kernel/kernel.cpp b/src/core/hle/kernel/kernel.cpp index 0ffb78d51..2ceeaeb5f 100644 --- a/src/core/hle/kernel/kernel.cpp +++ b/src/core/hle/kernel/kernel.cpp @@ -63,8 +63,6 @@ struct KernelCore::Impl { global_scheduler_context = std::make_unique<Kernel::GlobalSchedulerContext>(kernel); global_handle_table = std::make_unique<Kernel::KHandleTable>(kernel); - service_thread_manager = - std::make_unique<Common::ThreadWorker>(1, "yuzu:ServiceThreadManager"); is_phantom_mode_for_singlecore = false; InitializePhysicalCores(); @@ -96,7 +94,6 @@ struct KernelCore::Impl { process_list.clear(); // Ensures all service threads gracefully shutdown - service_thread_manager.reset(); service_threads.clear(); next_object_id = 0; @@ -680,10 +677,6 @@ struct KernelCore::Impl { // Threads used for services std::unordered_set<std::shared_ptr<Kernel::ServiceThread>> service_threads; - // Service threads are managed by a worker thread, so that a calling service thread can queue up - // the release of itself - std::unique_ptr<Common::ThreadWorker> service_thread_manager; - std::array<KThread*, Core::Hardware::NUM_CPU_CORES> suspend_threads; std::array<Core::CPUInterruptHandler, Core::Hardware::NUM_CPU_CORES> interrupts{}; std::array<std::unique_ptr<Kernel::KScheduler>, Core::Hardware::NUM_CPU_CORES> schedulers{}; @@ -986,17 +979,14 @@ void KernelCore::ExitSVCProfile() { std::weak_ptr<Kernel::ServiceThread> KernelCore::CreateServiceThread(const std::string& name) { auto service_thread = std::make_shared<Kernel::ServiceThread>(*this, 1, name); - impl->service_thread_manager->QueueWork( - [this, service_thread] { impl->service_threads.emplace(service_thread); }); + impl->service_threads.emplace(service_thread); return service_thread; } void KernelCore::ReleaseServiceThread(std::weak_ptr<Kernel::ServiceThread> service_thread) { - impl->service_thread_manager->QueueWork([this, service_thread] { - if (auto strong_ptr = service_thread.lock()) { - impl->service_threads.erase(strong_ptr); - } - }); + if (auto strong_ptr = service_thread.lock()) { + impl->service_threads.erase(strong_ptr); + } } Init::KSlabResourceCounts& KernelCore::SlabResourceCounts() { |