summaryrefslogtreecommitdiff
path: root/src/core/hle/service/pcv
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/pcv
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/pcv')
-rw-r--r--src/core/hle/service/pcv/pcv.cpp15
-rw-r--r--src/core/hle/service/pcv/pcv.h6
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
11namespace Service::PCV { 11namespace Service::PCV {
12 12
@@ -141,11 +141,14 @@ public:
141 } 141 }
142}; 142};
143 143
144void InstallInterfaces(SM::ServiceManager& sm, Core::System& system) { 144void 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 {
7class System; 7class System;
8} 8}
9 9
10namespace Service::SM {
11class ServiceManager;
12}
13
14namespace Service::PCV { 10namespace Service::PCV {
15 11
16enum class DeviceCode : u32 { 12enum class DeviceCode : u32 {
@@ -104,6 +100,6 @@ enum class DeviceCode : u32 {
104 OscClk = 0x40000080 100 OscClk = 0x40000080
105}; 101};
106 102
107void InstallInterfaces(SM::ServiceManager& sm, Core::System& system); 103void LoopProcess(Core::System& system);
108 104
109} // namespace Service::PCV 105} // namespace Service::PCV