summaryrefslogtreecommitdiff
path: root/src/core/hle/service/erpt
diff options
context:
space:
mode:
authorGravatar Liam2023-02-18 16:26:48 -0500
committerGravatar Liam2023-02-21 12:19:25 -0500
commita9369726147c7499e0016e183d5d56a7b44efe4b (patch)
treec1d1b4a9fdafd92863c0922b05d72c14de83ffa7 /src/core/hle/service/erpt
parentcore: defer cpu shutdown (diff)
downloadyuzu-a9369726147c7499e0016e183d5d56a7b44efe4b.tar.gz
yuzu-a9369726147c7499e0016e183d5d56a7b44efe4b.tar.xz
yuzu-a9369726147c7499e0016e183d5d56a7b44efe4b.zip
service: refactor server architecture
Converts services to have their own processes
Diffstat (limited to 'src/core/hle/service/erpt')
-rw-r--r--src/core/hle/service/erpt/erpt.cpp11
-rw-r--r--src/core/hle/service/erpt/erpt.h7
2 files changed, 9 insertions, 9 deletions
diff --git a/src/core/hle/service/erpt/erpt.cpp b/src/core/hle/service/erpt/erpt.cpp
index 923c0022a..3ea862fad 100644
--- a/src/core/hle/service/erpt/erpt.cpp
+++ b/src/core/hle/service/erpt/erpt.cpp
@@ -4,6 +4,7 @@
4#include <memory> 4#include <memory>
5 5
6#include "core/hle/service/erpt/erpt.h" 6#include "core/hle/service/erpt/erpt.h"
7#include "core/hle/service/server_manager.h"
7#include "core/hle/service/service.h" 8#include "core/hle/service/service.h"
8#include "core/hle/service/sm/sm.h" 9#include "core/hle/service/sm/sm.h"
9 10
@@ -52,9 +53,13 @@ public:
52 } 53 }
53}; 54};
54 55
55void InstallInterfaces(SM::ServiceManager& sm, Core::System& system) { 56void LoopProcess(Core::System& system) {
56 std::make_shared<ErrorReportContext>(system)->InstallAsService(sm); 57 auto server_manager = std::make_unique<ServerManager>(system);
57 std::make_shared<ErrorReportSession>(system)->InstallAsService(sm); 58
59 server_manager->RegisterNamedService("erpt:c", std::make_shared<ErrorReportContext>(system));
60 server_manager->RegisterNamedService("erpt:r", std::make_shared<ErrorReportSession>(system));
61
62 ServerManager::RunServer(std::move(server_manager));
58} 63}
59 64
60} // namespace Service::ERPT 65} // namespace Service::ERPT
diff --git a/src/core/hle/service/erpt/erpt.h b/src/core/hle/service/erpt/erpt.h
index 507d626ec..60094f556 100644
--- a/src/core/hle/service/erpt/erpt.h
+++ b/src/core/hle/service/erpt/erpt.h
@@ -7,13 +7,8 @@ namespace Core {
7class System; 7class System;
8} 8}
9 9
10namespace Service::SM {
11class ServiceManager;
12}
13
14namespace Service::ERPT { 10namespace Service::ERPT {
15 11
16/// Registers all ERPT services with the specified service manager. 12void LoopProcess(Core::System& system);
17void InstallInterfaces(SM::ServiceManager& sm, Core::System& system);
18 13
19} // namespace Service::ERPT 14} // namespace Service::ERPT