summaryrefslogtreecommitdiffstats
path: root/src/core/hle/service
diff options
context:
space:
mode:
authorLioncash <mathew1800@gmail.com>2018-09-02 17:58:58 +0200
committerLioncash <mathew1800@gmail.com>2018-09-02 18:35:30 +0200
commit1242c1ec0aab88d91b0bb4faf6200e4f20e4bdc2 (patch)
treef540b9cbc6db29bb5d41668f7efa8fc5c4e44469 /src/core/hle/service
parentMerge pull request #1213 from DarkLordZach/octopath-fs (diff)
downloadyuzu-1242c1ec0aab88d91b0bb4faf6200e4f20e4bdc2.tar
yuzu-1242c1ec0aab88d91b0bb4faf6200e4f20e4bdc2.tar.gz
yuzu-1242c1ec0aab88d91b0bb4faf6200e4f20e4bdc2.tar.bz2
yuzu-1242c1ec0aab88d91b0bb4faf6200e4f20e4bdc2.tar.lz
yuzu-1242c1ec0aab88d91b0bb4faf6200e4f20e4bdc2.tar.xz
yuzu-1242c1ec0aab88d91b0bb4faf6200e4f20e4bdc2.tar.zst
yuzu-1242c1ec0aab88d91b0bb4faf6200e4f20e4bdc2.zip
Diffstat (limited to 'src/core/hle/service')
-rw-r--r--src/core/hle/service/service.cpp9
-rw-r--r--src/core/hle/service/service.h7
2 files changed, 2 insertions, 14 deletions
diff --git a/src/core/hle/service/service.cpp b/src/core/hle/service/service.cpp
index 8fb907072..9d804652e 100644
--- a/src/core/hle/service/service.cpp
+++ b/src/core/hle/service/service.cpp
@@ -12,6 +12,7 @@
#include "core/hle/ipc_helpers.h"
#include "core/hle/kernel/client_port.h"
#include "core/hle/kernel/handle_table.h"
+#include "core/hle/kernel/kernel.h"
#include "core/hle/kernel/process.h"
#include "core/hle/kernel/server_port.h"
#include "core/hle/kernel/thread.h"
@@ -114,7 +115,7 @@ void ServiceFrameworkBase::InstallAsNamedPort() {
std::tie(server_port, client_port) =
ServerPort::CreatePortPair(kernel, max_sessions, service_name);
server_port->SetHleHandler(shared_from_this());
- AddNamedPort(service_name, std::move(client_port));
+ kernel.AddNamedPort(service_name, std::move(client_port));
}
Kernel::SharedPtr<Kernel::ClientPort> ServiceFrameworkBase::CreatePort() {
@@ -197,11 +198,6 @@ ResultCode ServiceFrameworkBase::HandleSyncRequest(Kernel::HLERequestContext& co
////////////////////////////////////////////////////////////////////////////////////////////////////
// Module interface
-// TODO(yuriks): Move to kernel
-void AddNamedPort(std::string name, SharedPtr<ClientPort> port) {
- g_kernel_named_ports.emplace(std::move(name), std::move(port));
-}
-
/// Initialize ServiceManager
void Init(std::shared_ptr<SM::ServiceManager>& sm, const FileSys::VirtualFilesystem& rfs) {
// NVFlinger needs to be accessed by several services like Vi and AppletOE so we instantiate it
@@ -264,7 +260,6 @@ void Init(std::shared_ptr<SM::ServiceManager>& sm, const FileSys::VirtualFilesys
/// Shutdown ServiceManager
void Shutdown() {
- g_kernel_named_ports.clear();
LOG_DEBUG(Service, "shutdown OK");
}
} // namespace Service
diff --git a/src/core/hle/service/service.h b/src/core/hle/service/service.h
index cd9c74f3d..7a051523e 100644
--- a/src/core/hle/service/service.h
+++ b/src/core/hle/service/service.h
@@ -6,7 +6,6 @@
#include <cstddef>
#include <string>
-#include <unordered_map>
#include <boost/container/flat_map.hpp>
#include "common/common_types.h"
#include "core/hle/kernel/hle_ipc.h"
@@ -187,10 +186,4 @@ void Init(std::shared_ptr<SM::ServiceManager>& sm,
/// Shutdown ServiceManager
void Shutdown();
-/// Map of named ports managed by the kernel, which can be retrieved using the ConnectToPort SVC.
-extern std::unordered_map<std::string, Kernel::SharedPtr<Kernel::ClientPort>> g_kernel_named_ports;
-
-/// Adds a port to the named port table
-void AddNamedPort(std::string name, Kernel::SharedPtr<Kernel::ClientPort> port);
-
} // namespace Service