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/btdrv | |
| 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/btdrv')
| -rw-r--r-- | src/core/hle/service/btdrv/btdrv.cpp | 10 | ||||
| -rw-r--r-- | src/core/hle/service/btdrv/btdrv.h | 3 |
2 files changed, 8 insertions, 5 deletions
diff --git a/src/core/hle/service/btdrv/btdrv.cpp b/src/core/hle/service/btdrv/btdrv.cpp index ec7e5320c..ed020d03f 100644 --- a/src/core/hle/service/btdrv/btdrv.cpp +++ b/src/core/hle/service/btdrv/btdrv.cpp | |||
| @@ -7,6 +7,7 @@ | |||
| 7 | #include "core/hle/kernel/k_event.h" | 7 | #include "core/hle/kernel/k_event.h" |
| 8 | #include "core/hle/service/btdrv/btdrv.h" | 8 | #include "core/hle/service/btdrv/btdrv.h" |
| 9 | #include "core/hle/service/kernel_helpers.h" | 9 | #include "core/hle/service/kernel_helpers.h" |
| 10 | #include "core/hle/service/server_manager.h" | ||
| 10 | #include "core/hle/service/service.h" | 11 | #include "core/hle/service/service.h" |
| 11 | #include "core/hle/service/sm/sm.h" | 12 | #include "core/hle/service/sm/sm.h" |
| 12 | 13 | ||
| @@ -196,9 +197,12 @@ public: | |||
| 196 | } | 197 | } |
| 197 | }; | 198 | }; |
| 198 | 199 | ||
| 199 | void InstallInterfaces(SM::ServiceManager& sm, Core::System& system) { | 200 | void LoopProcess(Core::System& system) { |
| 200 | std::make_shared<BtDrv>(system)->InstallAsService(sm); | 201 | auto server_manager = std::make_unique<ServerManager>(system); |
| 201 | std::make_shared<Bt>(system)->InstallAsService(sm); | 202 | |
| 203 | server_manager->RegisterNamedService("btdrv", std::make_shared<BtDrv>(system)); | ||
| 204 | server_manager->RegisterNamedService("bt", std::make_shared<Bt>(system)); | ||
| 205 | ServerManager::RunServer(std::move(server_manager)); | ||
| 202 | } | 206 | } |
| 203 | 207 | ||
| 204 | } // namespace Service::BtDrv | 208 | } // namespace Service::BtDrv |
diff --git a/src/core/hle/service/btdrv/btdrv.h b/src/core/hle/service/btdrv/btdrv.h index 9cbe2926f..42713860e 100644 --- a/src/core/hle/service/btdrv/btdrv.h +++ b/src/core/hle/service/btdrv/btdrv.h | |||
| @@ -13,7 +13,6 @@ class System; | |||
| 13 | 13 | ||
| 14 | namespace Service::BtDrv { | 14 | namespace Service::BtDrv { |
| 15 | 15 | ||
| 16 | /// Registers all BtDrv services with the specified service manager. | 16 | void LoopProcess(Core::System& system); |
| 17 | void InstallInterfaces(SM::ServiceManager& sm, Core::System& system); | ||
| 18 | 17 | ||
| 19 | } // namespace Service::BtDrv | 18 | } // namespace Service::BtDrv |