summaryrefslogtreecommitdiffstats
path: root/src/core/hle/service/ldr
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/hle/service/ldr')
-rw-r--r--src/core/hle/service/ldr/ldr.cpp18
-rw-r--r--src/core/hle/service/ldr/ldr.h7
2 files changed, 12 insertions, 13 deletions
diff --git a/src/core/hle/service/ldr/ldr.cpp b/src/core/hle/service/ldr/ldr.cpp
index 2d4d6fe3e..c82e189f4 100644
--- a/src/core/hle/service/ldr/ldr.cpp
+++ b/src/core/hle/service/ldr/ldr.cpp
@@ -14,6 +14,7 @@
#include "core/hle/kernel/svc_results.h"
#include "core/hle/kernel/svc_types.h"
#include "core/hle/service/ldr/ldr.h"
+#include "core/hle/service/server_manager.h"
#include "core/hle/service/service.h"
#include "core/loader/nro.h"
#include "core/memory.h"
@@ -159,8 +160,7 @@ public:
class RelocatableObject final : public ServiceFramework<RelocatableObject> {
public:
- explicit RelocatableObject(Core::System& system_)
- : ServiceFramework{system_, "ldr:ro", ServiceThreadType::CreateNew} {
+ explicit RelocatableObject(Core::System& system_) : ServiceFramework{system_, "ldr:ro"} {
// clang-format off
static const FunctionInfo functions[] = {
{0, &RelocatableObject::LoadModule, "LoadModule"},
@@ -682,11 +682,15 @@ private:
}
};
-void InstallInterfaces(SM::ServiceManager& sm, Core::System& system) {
- std::make_shared<DebugMonitor>(system)->InstallAsService(sm);
- std::make_shared<ProcessManager>(system)->InstallAsService(sm);
- std::make_shared<Shell>(system)->InstallAsService(sm);
- std::make_shared<RelocatableObject>(system)->InstallAsService(sm);
+void LoopProcess(Core::System& system) {
+ auto server_manager = std::make_unique<ServerManager>(system);
+
+ server_manager->RegisterNamedService("ldr:dmnt", std::make_shared<DebugMonitor>(system));
+ server_manager->RegisterNamedService("ldr:pm", std::make_shared<ProcessManager>(system));
+ server_manager->RegisterNamedService("ldr:shel", std::make_shared<Shell>(system));
+ server_manager->RegisterNamedService("ldr:ro", std::make_shared<RelocatableObject>(system));
+
+ ServerManager::RunServer(std::move(server_manager));
}
} // namespace Service::LDR
diff --git a/src/core/hle/service/ldr/ldr.h b/src/core/hle/service/ldr/ldr.h
index 25ffd8442..c9281dbfb 100644
--- a/src/core/hle/service/ldr/ldr.h
+++ b/src/core/hle/service/ldr/ldr.h
@@ -7,13 +7,8 @@ namespace Core {
class System;
}
-namespace Service::SM {
-class ServiceManager;
-}
-
namespace Service::LDR {
-/// Registers all LDR services with the specified service manager.
-void InstallInterfaces(SM::ServiceManager& sm, Core::System& system);
+void LoopProcess(Core::System& system);
} // namespace Service::LDR