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/npns | |
| 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/npns')
| -rw-r--r-- | src/core/hle/service/npns/npns.cpp | 11 | ||||
| -rw-r--r-- | src/core/hle/service/npns/npns.h | 6 |
2 files changed, 8 insertions, 9 deletions
diff --git a/src/core/hle/service/npns/npns.cpp b/src/core/hle/service/npns/npns.cpp index 8133711c2..a162e5c54 100644 --- a/src/core/hle/service/npns/npns.cpp +++ b/src/core/hle/service/npns/npns.cpp | |||
| @@ -4,8 +4,8 @@ | |||
| 4 | #include <memory> | 4 | #include <memory> |
| 5 | 5 | ||
| 6 | #include "core/hle/service/npns/npns.h" | 6 | #include "core/hle/service/npns/npns.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::NPNS { | 10 | namespace Service::NPNS { |
| 11 | 11 | ||
| @@ -94,9 +94,12 @@ public: | |||
| 94 | } | 94 | } |
| 95 | }; | 95 | }; |
| 96 | 96 | ||
| 97 | void InstallInterfaces(SM::ServiceManager& sm, Core::System& system) { | 97 | void LoopProcess(Core::System& system) { |
| 98 | std::make_shared<NPNS_S>(system)->InstallAsService(sm); | 98 | auto server_manager = std::make_unique<ServerManager>(system); |
| 99 | std::make_shared<NPNS_U>(system)->InstallAsService(sm); | 99 | |
| 100 | server_manager->RegisterNamedService("npns:s", std::make_shared<NPNS_S>(system)); | ||
| 101 | server_manager->RegisterNamedService("npns:u", std::make_shared<NPNS_U>(system)); | ||
| 102 | ServerManager::RunServer(std::move(server_manager)); | ||
| 100 | } | 103 | } |
| 101 | 104 | ||
| 102 | } // namespace Service::NPNS | 105 | } // namespace Service::NPNS |
diff --git a/src/core/hle/service/npns/npns.h b/src/core/hle/service/npns/npns.h index 84e6ec437..0019fca76 100644 --- a/src/core/hle/service/npns/npns.h +++ b/src/core/hle/service/npns/npns.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::NPNS { | 10 | namespace Service::NPNS { |
| 15 | 11 | ||
| 16 | void InstallInterfaces(SM::ServiceManager& sm, Core::System& system); | 12 | void LoopProcess(Core::System& system); |
| 17 | 13 | ||
| 18 | } // namespace Service::NPNS | 14 | } // namespace Service::NPNS |