diff options
author | bunnei <bunneidev@gmail.com> | 2021-04-22 06:53:56 +0200 |
---|---|---|
committer | bunnei <bunneidev@gmail.com> | 2021-05-06 01:40:52 +0200 |
commit | 7a068641006da739d6af5681a022018785379365 (patch) | |
tree | aee13360312f8fb9ab9b64310cc478fcc6a5efb1 /src/core/hle/service | |
parent | hle: kernel: Migrate KClientPort to KAutoObject. (diff) | |
download | yuzu-7a068641006da739d6af5681a022018785379365.tar yuzu-7a068641006da739d6af5681a022018785379365.tar.gz yuzu-7a068641006da739d6af5681a022018785379365.tar.bz2 yuzu-7a068641006da739d6af5681a022018785379365.tar.lz yuzu-7a068641006da739d6af5681a022018785379365.tar.xz yuzu-7a068641006da739d6af5681a022018785379365.tar.zst yuzu-7a068641006da739d6af5681a022018785379365.zip |
Diffstat (limited to '')
-rw-r--r-- | src/core/hle/service/service.cpp | 4 | ||||
-rw-r--r-- | src/core/hle/service/sm/sm.cpp | 14 | ||||
-rw-r--r-- | src/core/hle/service/sm/sm.h | 7 |
3 files changed, 12 insertions, 13 deletions
diff --git a/src/core/hle/service/service.cpp b/src/core/hle/service/service.cpp index d8ad09b49..a882b3b4e 100644 --- a/src/core/hle/service/service.cpp +++ b/src/core/hle/service/service.cpp @@ -12,10 +12,10 @@ #include "core/hle/ipc.h" #include "core/hle/ipc_helpers.h" #include "core/hle/kernel/k_client_port.h" +#include "core/hle/kernel/k_server_port.h" #include "core/hle/kernel/k_thread.h" #include "core/hle/kernel/kernel.h" #include "core/hle/kernel/process.h" -#include "core/hle/kernel/server_port.h" #include "core/hle/service/acc/acc.h" #include "core/hle/service/am/am.h" #include "core/hle/service/aoc/aoc_u.h" @@ -117,7 +117,7 @@ void ServiceFrameworkBase::InstallAsNamedPort(Kernel::KernelCore& kernel) { ASSERT(!port_installed); auto [server_port, client_port] = - Kernel::ServerPort::CreatePortPair(kernel, max_sessions, service_name); + Kernel::KServerPort::CreatePortPair(kernel, max_sessions, service_name); server_port->SetHleHandler(shared_from_this()); kernel.AddNamedPort(service_name, client_port); port_installed = true; diff --git a/src/core/hle/service/sm/sm.cpp b/src/core/hle/service/sm/sm.cpp index 39575ce3d..51274bfb1 100644 --- a/src/core/hle/service/sm/sm.cpp +++ b/src/core/hle/service/sm/sm.cpp @@ -8,9 +8,9 @@ #include "core/hle/ipc_helpers.h" #include "core/hle/kernel/k_client_port.h" #include "core/hle/kernel/k_client_session.h" +#include "core/hle/kernel/k_server_port.h" #include "core/hle/kernel/k_server_session.h" #include "core/hle/kernel/k_session.h" -#include "core/hle/kernel/server_port.h" #include "core/hle/result.h" #include "core/hle/service/sm/controller.h" #include "core/hle/service/sm/sm.h" @@ -49,8 +49,8 @@ void ServiceManager::InstallInterfaces(std::shared_ptr<ServiceManager> self, Cor self->controller_interface = std::make_unique<Controller>(system); } -ResultVal<std::shared_ptr<Kernel::ServerPort>> ServiceManager::RegisterService(std::string name, - u32 max_sessions) { +ResultVal<Kernel::KServerPort*> ServiceManager::RegisterService(std::string name, + u32 max_sessions) { CASCADE_CODE(ValidateServiceName(name)); @@ -60,12 +60,12 @@ ResultVal<std::shared_ptr<Kernel::ServerPort>> ServiceManager::RegisterService(s } auto [server_port, client_port] = - Kernel::ServerPort::CreatePortPair(kernel, max_sessions, name); + Kernel::KServerPort::CreatePortPair(kernel, max_sessions, name); client_port->Open(); - registered_services.emplace(std::move(name), std::move(client_port)); - return MakeResult(std::move(server_port)); + registered_services.emplace(std::move(name), client_port); + return MakeResult(server_port); } ResultCode ServiceManager::UnregisterService(const std::string& name) { @@ -172,7 +172,7 @@ void SM::RegisterService(Kernel::HLERequestContext& ctx) { rb.Push(handle.Code()); auto server_port = handle.Unwrap(); - rb.PushMoveObjects(server_port.get()); + rb.PushMoveObjects(server_port); } void SM::UnregisterService(Kernel::HLERequestContext& ctx) { diff --git a/src/core/hle/service/sm/sm.h b/src/core/hle/service/sm/sm.h index aee9aefec..b0204c4bb 100644 --- a/src/core/hle/service/sm/sm.h +++ b/src/core/hle/service/sm/sm.h @@ -11,8 +11,8 @@ #include "common/concepts.h" #include "core/hle/kernel/k_client_port.h" +#include "core/hle/kernel/k_server_port.h" #include "core/hle/kernel/object.h" -#include "core/hle/kernel/server_port.h" #include "core/hle/result.h" #include "core/hle/service/service.h" @@ -24,7 +24,7 @@ namespace Kernel { class KClientPort; class KClientSession; class KernelCore; -class ServerPort; +class KServerPort; class SessionRequestHandler; } // namespace Kernel @@ -55,8 +55,7 @@ public: explicit ServiceManager(Kernel::KernelCore& kernel_); ~ServiceManager(); - ResultVal<std::shared_ptr<Kernel::ServerPort>> RegisterService(std::string name, - u32 max_sessions); + ResultVal<Kernel::KServerPort*> RegisterService(std::string name, u32 max_sessions); ResultCode UnregisterService(const std::string& name); ResultVal<Kernel::KClientPort*> GetServicePort(const std::string& name); |