summaryrefslogtreecommitdiff
path: root/src/core/hle/service/bcat
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/bcat
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/bcat')
-rw-r--r--src/core/hle/service/bcat/bcat_module.cpp26
-rw-r--r--src/core/hle/service/bcat/bcat_module.h3
2 files changed, 18 insertions, 11 deletions
diff --git a/src/core/hle/service/bcat/bcat_module.cpp b/src/core/hle/service/bcat/bcat_module.cpp
index 6e6fed227..1db3f026b 100644
--- a/src/core/hle/service/bcat/bcat_module.cpp
+++ b/src/core/hle/service/bcat/bcat_module.cpp
@@ -15,6 +15,7 @@
15#include "core/hle/service/bcat/bcat.h" 15#include "core/hle/service/bcat/bcat.h"
16#include "core/hle/service/bcat/bcat_module.h" 16#include "core/hle/service/bcat/bcat_module.h"
17#include "core/hle/service/filesystem/filesystem.h" 17#include "core/hle/service/filesystem/filesystem.h"
18#include "core/hle/service/server_manager.h"
18 19
19namespace Service::BCAT { 20namespace Service::BCAT {
20 21
@@ -585,16 +586,23 @@ Module::Interface::Interface(Core::System& system_, std::shared_ptr<Module> modu
585 586
586Module::Interface::~Interface() = default; 587Module::Interface::~Interface() = default;
587 588
588void InstallInterfaces(Core::System& system) { 589void LoopProcess(Core::System& system) {
590 auto server_manager = std::make_unique<ServerManager>(system);
589 auto module = std::make_shared<Module>(); 591 auto module = std::make_shared<Module>();
590 std::make_shared<BCAT>(system, module, system.GetFileSystemController(), "bcat:a") 592
591 ->InstallAsService(system.ServiceManager()); 593 server_manager->RegisterNamedService(
592 std::make_shared<BCAT>(system, module, system.GetFileSystemController(), "bcat:m") 594 "bcat:a",
593 ->InstallAsService(system.ServiceManager()); 595 std::make_shared<BCAT>(system, module, system.GetFileSystemController(), "bcat:a"));
594 std::make_shared<BCAT>(system, module, system.GetFileSystemController(), "bcat:u") 596 server_manager->RegisterNamedService(
595 ->InstallAsService(system.ServiceManager()); 597 "bcat:m",
596 std::make_shared<BCAT>(system, module, system.GetFileSystemController(), "bcat:s") 598 std::make_shared<BCAT>(system, module, system.GetFileSystemController(), "bcat:m"));
597 ->InstallAsService(system.ServiceManager()); 599 server_manager->RegisterNamedService(
600 "bcat:u",
601 std::make_shared<BCAT>(system, module, system.GetFileSystemController(), "bcat:u"));
602 server_manager->RegisterNamedService(
603 "bcat:s",
604 std::make_shared<BCAT>(system, module, system.GetFileSystemController(), "bcat:s"));
605 ServerManager::RunServer(std::move(server_manager));
598} 606}
599 607
600} // namespace Service::BCAT 608} // namespace Service::BCAT
diff --git a/src/core/hle/service/bcat/bcat_module.h b/src/core/hle/service/bcat/bcat_module.h
index b2fcf9bfb..0c134d1ff 100644
--- a/src/core/hle/service/bcat/bcat_module.h
+++ b/src/core/hle/service/bcat/bcat_module.h
@@ -39,8 +39,7 @@ public:
39 }; 39 };
40}; 40};
41 41
42/// Registers all BCAT services with the specified service manager. 42void LoopProcess(Core::System& system);
43void InstallInterfaces(Core::System& system);
44 43
45} // namespace BCAT 44} // namespace BCAT
46 45