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/glue | |
| 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/glue')
| -rw-r--r-- | src/core/hle/service/glue/glue.cpp | 23 | ||||
| -rw-r--r-- | src/core/hle/service/glue/glue.h | 3 |
2 files changed, 15 insertions, 11 deletions
diff --git a/src/core/hle/service/glue/glue.cpp b/src/core/hle/service/glue/glue.cpp index 717f2562b..993c3d21d 100644 --- a/src/core/hle/service/glue/glue.cpp +++ b/src/core/hle/service/glue/glue.cpp | |||
| @@ -8,25 +8,30 @@ | |||
| 8 | #include "core/hle/service/glue/ectx.h" | 8 | #include "core/hle/service/glue/ectx.h" |
| 9 | #include "core/hle/service/glue/glue.h" | 9 | #include "core/hle/service/glue/glue.h" |
| 10 | #include "core/hle/service/glue/notif.h" | 10 | #include "core/hle/service/glue/notif.h" |
| 11 | #include "core/hle/service/server_manager.h" | ||
| 11 | 12 | ||
| 12 | namespace Service::Glue { | 13 | namespace Service::Glue { |
| 13 | 14 | ||
| 14 | void InstallInterfaces(Core::System& system) { | 15 | void LoopProcess(Core::System& system) { |
| 16 | auto server_manager = std::make_unique<ServerManager>(system); | ||
| 17 | |||
| 15 | // ARP | 18 | // ARP |
| 16 | std::make_shared<ARP_R>(system, system.GetARPManager()) | 19 | server_manager->RegisterNamedService("arp:r", |
| 17 | ->InstallAsService(system.ServiceManager()); | 20 | std::make_shared<ARP_R>(system, system.GetARPManager())); |
| 18 | std::make_shared<ARP_W>(system, system.GetARPManager()) | 21 | server_manager->RegisterNamedService("arp:w", |
| 19 | ->InstallAsService(system.ServiceManager()); | 22 | std::make_shared<ARP_W>(system, system.GetARPManager())); |
| 20 | 23 | ||
| 21 | // BackGround Task Controller | 24 | // BackGround Task Controller |
| 22 | std::make_shared<BGTC_T>(system)->InstallAsService(system.ServiceManager()); | 25 | server_manager->RegisterNamedService("bgtc:t", std::make_shared<BGTC_T>(system)); |
| 23 | std::make_shared<BGTC_SC>(system)->InstallAsService(system.ServiceManager()); | 26 | server_manager->RegisterNamedService("bgtc:sc", std::make_shared<BGTC_SC>(system)); |
| 24 | 27 | ||
| 25 | // Error Context | 28 | // Error Context |
| 26 | std::make_shared<ECTX_AW>(system)->InstallAsService(system.ServiceManager()); | 29 | server_manager->RegisterNamedService("ectx:aw", std::make_shared<ECTX_AW>(system)); |
| 27 | 30 | ||
| 28 | // Notification Services for application | 31 | // Notification Services for application |
| 29 | std::make_shared<NOTIF_A>(system)->InstallAsService(system.ServiceManager()); | 32 | server_manager->RegisterNamedService("notif:a", std::make_shared<NOTIF_A>(system)); |
| 33 | |||
| 34 | ServerManager::RunServer(std::move(server_manager)); | ||
| 30 | } | 35 | } |
| 31 | 36 | ||
| 32 | } // namespace Service::Glue | 37 | } // namespace Service::Glue |
diff --git a/src/core/hle/service/glue/glue.h b/src/core/hle/service/glue/glue.h index ae7c6d235..2a906f5ad 100644 --- a/src/core/hle/service/glue/glue.h +++ b/src/core/hle/service/glue/glue.h | |||
| @@ -9,7 +9,6 @@ class System; | |||
| 9 | 9 | ||
| 10 | namespace Service::Glue { | 10 | namespace Service::Glue { |
| 11 | 11 | ||
| 12 | /// Registers all Glue services with the specified service manager. | 12 | void LoopProcess(Core::System& system); |
| 13 | void InstallInterfaces(Core::System& system); | ||
| 14 | 13 | ||
| 15 | } // namespace Service::Glue | 14 | } // namespace Service::Glue |