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/pcie | |
| 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/pcie')
| -rw-r--r-- | src/core/hle/service/pcie/pcie.cpp | 9 | ||||
| -rw-r--r-- | src/core/hle/service/pcie/pcie.h | 6 |
2 files changed, 7 insertions, 8 deletions
diff --git a/src/core/hle/service/pcie/pcie.cpp b/src/core/hle/service/pcie/pcie.cpp index 79501b9f9..c6da6eb51 100644 --- a/src/core/hle/service/pcie/pcie.cpp +++ b/src/core/hle/service/pcie/pcie.cpp | |||
| @@ -4,8 +4,8 @@ | |||
| 4 | #include <memory> | 4 | #include <memory> |
| 5 | 5 | ||
| 6 | #include "core/hle/service/pcie/pcie.h" | 6 | #include "core/hle/service/pcie/pcie.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 | 9 | ||
| 10 | namespace Service::PCIe { | 10 | namespace Service::PCIe { |
| 11 | 11 | ||
| @@ -59,8 +59,11 @@ public: | |||
| 59 | } | 59 | } |
| 60 | }; | 60 | }; |
| 61 | 61 | ||
| 62 | void InstallInterfaces(SM::ServiceManager& sm, Core::System& system) { | 62 | void LoopProcess(Core::System& system) { |
| 63 | std::make_shared<PCIe>(system)->InstallAsService(sm); | 63 | auto server_manager = std::make_unique<ServerManager>(system); |
| 64 | |||
| 65 | server_manager->RegisterNamedService("pcie", std::make_shared<PCIe>(system)); | ||
| 66 | ServerManager::RunServer(std::move(server_manager)); | ||
| 64 | } | 67 | } |
| 65 | 68 | ||
| 66 | } // namespace Service::PCIe | 69 | } // namespace Service::PCIe |
diff --git a/src/core/hle/service/pcie/pcie.h b/src/core/hle/service/pcie/pcie.h index cebfd9042..5c2d4b805 100644 --- a/src/core/hle/service/pcie/pcie.h +++ b/src/core/hle/service/pcie/pcie.h | |||
| @@ -7,12 +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::PCIe { | 10 | namespace Service::PCIe { |
| 15 | 11 | ||
| 16 | void InstallInterfaces(SM::ServiceManager& sm, Core::System& system); | 12 | void LoopProcess(Core::System& system); |
| 17 | 13 | ||
| 18 | } // namespace Service::PCIe | 14 | } // namespace Service::PCIe |