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/pcv | |
| 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/pcv')
| -rw-r--r-- | src/core/hle/service/pcv/pcv.cpp | 15 | ||||
| -rw-r--r-- | src/core/hle/service/pcv/pcv.h | 6 |
2 files changed, 10 insertions, 11 deletions
diff --git a/src/core/hle/service/pcv/pcv.cpp b/src/core/hle/service/pcv/pcv.cpp index 98037a8d4..be64b94ea 100644 --- a/src/core/hle/service/pcv/pcv.cpp +++ b/src/core/hle/service/pcv/pcv.cpp | |||
| @@ -5,8 +5,8 @@ | |||
| 5 | 5 | ||
| 6 | #include "core/hle/ipc_helpers.h" | 6 | #include "core/hle/ipc_helpers.h" |
| 7 | #include "core/hle/service/pcv/pcv.h" | 7 | #include "core/hle/service/pcv/pcv.h" |
| 8 | #include "core/hle/service/server_manager.h" | ||
| 8 | #include "core/hle/service/service.h" | 9 | #include "core/hle/service/service.h" |
| 9 | #include "core/hle/service/sm/sm.h" | ||
| 10 | 10 | ||
| 11 | namespace Service::PCV { | 11 | namespace Service::PCV { |
| 12 | 12 | ||
| @@ -141,11 +141,14 @@ public: | |||
| 141 | } | 141 | } |
| 142 | }; | 142 | }; |
| 143 | 143 | ||
| 144 | void InstallInterfaces(SM::ServiceManager& sm, Core::System& system) { | 144 | void LoopProcess(Core::System& system) { |
| 145 | std::make_shared<PCV>(system)->InstallAsService(sm); | 145 | auto server_manager = std::make_unique<ServerManager>(system); |
| 146 | std::make_shared<CLKRST>(system, "clkrst")->InstallAsService(sm); | 146 | |
| 147 | std::make_shared<CLKRST>(system, "clkrst:i")->InstallAsService(sm); | 147 | server_manager->RegisterNamedService("pcv", std::make_shared<PCV>(system)); |
| 148 | std::make_shared<CLKRST_A>(system)->InstallAsService(sm); | 148 | server_manager->RegisterNamedService("clkrst", std::make_shared<CLKRST>(system, "clkrst")); |
| 149 | server_manager->RegisterNamedService("clkrst:i", std::make_shared<CLKRST>(system, "clkrst:i")); | ||
| 150 | server_manager->RegisterNamedService("clkrst:a", std::make_shared<CLKRST_A>(system)); | ||
| 151 | ServerManager::RunServer(std::move(server_manager)); | ||
| 149 | } | 152 | } |
| 150 | 153 | ||
| 151 | } // namespace Service::PCV | 154 | } // namespace Service::PCV |
diff --git a/src/core/hle/service/pcv/pcv.h b/src/core/hle/service/pcv/pcv.h index 6b26b6fa7..bf541e6fe 100644 --- a/src/core/hle/service/pcv/pcv.h +++ b/src/core/hle/service/pcv/pcv.h | |||
| @@ -7,10 +7,6 @@ namespace Core { | |||
| 7 | class System; | 7 | class System; |
| 8 | } | 8 | } |
| 9 | 9 | ||
| 10 | namespace Service::SM { | ||
| 11 | class ServiceManager; | ||
| 12 | } | ||
| 13 | |||
| 14 | namespace Service::PCV { | 10 | namespace Service::PCV { |
| 15 | 11 | ||
| 16 | enum class DeviceCode : u32 { | 12 | enum class DeviceCode : u32 { |
| @@ -104,6 +100,6 @@ enum class DeviceCode : u32 { | |||
| 104 | OscClk = 0x40000080 | 100 | OscClk = 0x40000080 |
| 105 | }; | 101 | }; |
| 106 | 102 | ||
| 107 | void InstallInterfaces(SM::ServiceManager& sm, Core::System& system); | 103 | void LoopProcess(Core::System& system); |
| 108 | 104 | ||
| 109 | } // namespace Service::PCV | 105 | } // namespace Service::PCV |