summaryrefslogtreecommitdiff
path: root/src/core/hle/kernel/kernel.cpp
diff options
context:
space:
mode:
authorGravatar bunnei2021-04-21 21:43:25 -0700
committerGravatar bunnei2021-05-05 16:40:52 -0700
commit0297448fbc6bf909b0bc061723c38208b9667b66 (patch)
tree7c21303536466b0a76331e4274ecb3e12eb40421 /src/core/hle/kernel/kernel.cpp
parenthle: kernel: HandleTable: Remove deprecated APIs. (diff)
downloadyuzu-0297448fbc6bf909b0bc061723c38208b9667b66.tar.gz
yuzu-0297448fbc6bf909b0bc061723c38208b9667b66.tar.xz
yuzu-0297448fbc6bf909b0bc061723c38208b9667b66.zip
hle: kernel: Migrate KClientPort to KAutoObject.
Diffstat (limited to 'src/core/hle/kernel/kernel.cpp')
-rw-r--r--src/core/hle/kernel/kernel.cpp10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/core/hle/kernel/kernel.cpp b/src/core/hle/kernel/kernel.cpp
index ada993f46..c939bb903 100644
--- a/src/core/hle/kernel/kernel.cpp
+++ b/src/core/hle/kernel/kernel.cpp
@@ -26,9 +26,9 @@
26#include "core/cpu_manager.h" 26#include "core/cpu_manager.h"
27#include "core/device_memory.h" 27#include "core/device_memory.h"
28#include "core/hardware_properties.h" 28#include "core/hardware_properties.h"
29#include "core/hle/kernel/client_port.h"
30#include "core/hle/kernel/handle_table.h" 29#include "core/hle/kernel/handle_table.h"
31#include "core/hle/kernel/init/init_slab_setup.h" 30#include "core/hle/kernel/init/init_slab_setup.h"
31#include "core/hle/kernel/k_client_port.h"
32#include "core/hle/kernel/k_memory_layout.h" 32#include "core/hle/kernel/k_memory_layout.h"
33#include "core/hle/kernel/k_memory_manager.h" 33#include "core/hle/kernel/k_memory_manager.h"
34#include "core/hle/kernel/k_resource_limit.h" 34#include "core/hle/kernel/k_resource_limit.h"
@@ -122,6 +122,9 @@ struct KernelCore::Impl {
122 122
123 preemption_event = nullptr; 123 preemption_event = nullptr;
124 124
125 for (auto& iter : named_ports) {
126 iter.second->Close();
127 }
125 named_ports.clear(); 128 named_ports.clear();
126 129
127 exclusive_monitor.reset(); 130 exclusive_monitor.reset();
@@ -843,8 +846,9 @@ void KernelCore::PrepareReschedule(std::size_t id) {
843 // TODO: Reimplement, this 846 // TODO: Reimplement, this
844} 847}
845 848
846void KernelCore::AddNamedPort(std::string name, std::shared_ptr<ClientPort> port) { 849void KernelCore::AddNamedPort(std::string name, KClientPort* port) {
847 impl->named_ports.emplace(std::move(name), std::move(port)); 850 port->Open();
851 impl->named_ports.emplace(std::move(name), port);
848} 852}
849 853
850KernelCore::NamedPortTable::iterator KernelCore::FindNamedPort(const std::string& name) { 854KernelCore::NamedPortTable::iterator KernelCore::FindNamedPort(const std::string& name) {