diff options
| author | 2023-02-18 16:26:48 -0500 | |
|---|---|---|
| committer | 2023-02-21 12:19:25 -0500 | |
| commit | a9369726147c7499e0016e183d5d56a7b44efe4b (patch) | |
| tree | c1d1b4a9fdafd92863c0922b05d72c14de83ffa7 /src/core/hle/service/erpt | |
| parent | core: defer cpu shutdown (diff) | |
| download | yuzu-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.cpp | 11 | ||||
| -rw-r--r-- | src/core/hle/service/erpt/erpt.h | 7 |
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 | ||
| 55 | void InstallInterfaces(SM::ServiceManager& sm, Core::System& system) { | 56 | void 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 { | |||
| 7 | class System; | 7 | class System; |
| 8 | } | 8 | } |
| 9 | 9 | ||
| 10 | namespace Service::SM { | ||
| 11 | class ServiceManager; | ||
| 12 | } | ||
| 13 | |||
| 14 | namespace Service::ERPT { | 10 | namespace Service::ERPT { |
| 15 | 11 | ||
| 16 | /// Registers all ERPT services with the specified service manager. | 12 | void LoopProcess(Core::System& system); |
| 17 | void InstallInterfaces(SM::ServiceManager& sm, Core::System& system); | ||
| 18 | 13 | ||
| 19 | } // namespace Service::ERPT | 14 | } // namespace Service::ERPT |