diff options
author | bunnei <bunneidev@gmail.com> | 2021-05-11 00:57:59 +0200 |
---|---|---|
committer | bunnei <bunneidev@gmail.com> | 2021-05-11 05:34:38 +0200 |
commit | c6de9657be71a9c659f9c991ec8d024ebf44d56e (patch) | |
tree | 8e5e3087a136fdcc218d789ae6f6457e83554919 /src/core/hle/service | |
parent | hle: kernel: KSession: Improve implementation of CloneCurrentObject. (diff) | |
download | yuzu-c6de9657be71a9c659f9c991ec8d024ebf44d56e.tar yuzu-c6de9657be71a9c659f9c991ec8d024ebf44d56e.tar.gz yuzu-c6de9657be71a9c659f9c991ec8d024ebf44d56e.tar.bz2 yuzu-c6de9657be71a9c659f9c991ec8d024ebf44d56e.tar.lz yuzu-c6de9657be71a9c659f9c991ec8d024ebf44d56e.tar.xz yuzu-c6de9657be71a9c659f9c991ec8d024ebf44d56e.tar.zst yuzu-c6de9657be71a9c659f9c991ec8d024ebf44d56e.zip |
Diffstat (limited to 'src/core/hle/service')
-rw-r--r-- | src/core/hle/service/service.cpp | 5 | ||||
-rw-r--r-- | src/core/hle/service/service.h | 8 |
2 files changed, 8 insertions, 5 deletions
diff --git a/src/core/hle/service/service.cpp b/src/core/hle/service/service.cpp index 00e683c2f..f3fd0f534 100644 --- a/src/core/hle/service/service.cpp +++ b/src/core/hle/service/service.cpp @@ -111,7 +111,7 @@ void ServiceFrameworkBase::InstallAsService(SM::ServiceManager& service_manager) port_installed = true; } -void ServiceFrameworkBase::InstallAsNamedPort(Kernel::KernelCore& kernel) { +Kernel::KClientPort& ServiceFrameworkBase::CreatePort(Kernel::KernelCore& kernel) { const auto guard = LockService(); ASSERT(!port_installed); @@ -119,9 +119,10 @@ void ServiceFrameworkBase::InstallAsNamedPort(Kernel::KernelCore& kernel) { auto* port = Kernel::KPort::Create(kernel); port->Initialize(max_sessions, false, service_name); port->GetServerPort().SetHleHandler(shared_from_this()); - kernel.AddNamedPort(service_name, &port->GetClientPort()); port_installed = true; + + return port->GetClientPort(); } void ServiceFrameworkBase::RegisterHandlersBase(const FunctionInfoBase* functions, std::size_t n) { diff --git a/src/core/hle/service/service.h b/src/core/hle/service/service.h index 884951428..16357b156 100644 --- a/src/core/hle/service/service.h +++ b/src/core/hle/service/service.h @@ -64,10 +64,12 @@ public: /// Creates a port pair and registers this service with the given ServiceManager. void InstallAsService(SM::ServiceManager& service_manager); - /// Creates a port pair and registers it on the kernel's global port registry. - void InstallAsNamedPort(Kernel::KernelCore& kernel); - /// Invokes a service request routine. + + /// Invokes a service request routine using the HIPC protocol. void InvokeRequest(Kernel::HLERequestContext& ctx); + /// Creates a port pair and registers it on the kernel's global port registry. + Kernel::KClientPort& CreatePort(Kernel::KernelCore& kernel); + /// Handles a synchronization request for the service. ResultCode HandleSyncRequest(Kernel::HLERequestContext& context) override; |