service: refactor server architecture
Converts services to have their own processes
This commit is contained in:
parent
23151ff498
commit
a936972614
140 changed files with 1388 additions and 1138 deletions
|
@ -7,6 +7,7 @@
|
|||
#include "core/hardware_properties.h"
|
||||
#include "core/hle/ipc_helpers.h"
|
||||
#include "core/hle/kernel/kernel.h"
|
||||
#include "core/hle/service/server_manager.h"
|
||||
#include "core/hle/service/time/time.h"
|
||||
#include "core/hle/service/time/time_interface.h"
|
||||
#include "core/hle/service/time/time_manager.h"
|
||||
|
@ -397,11 +398,17 @@ Module::Interface::Interface(std::shared_ptr<Module> module_, Core::System& syst
|
|||
|
||||
Module::Interface::~Interface() = default;
|
||||
|
||||
void InstallInterfaces(Core::System& system) {
|
||||
void LoopProcess(Core::System& system) {
|
||||
auto server_manager = std::make_unique<ServerManager>(system);
|
||||
auto module{std::make_shared<Module>()};
|
||||
std::make_shared<Time>(module, system, "time:a")->InstallAsService(system.ServiceManager());
|
||||
std::make_shared<Time>(module, system, "time:s")->InstallAsService(system.ServiceManager());
|
||||
std::make_shared<Time>(module, system, "time:u")->InstallAsService(system.ServiceManager());
|
||||
|
||||
server_manager->RegisterNamedService("time:a",
|
||||
std::make_shared<Time>(module, system, "time:a"));
|
||||
server_manager->RegisterNamedService("time:s",
|
||||
std::make_shared<Time>(module, system, "time:s"));
|
||||
server_manager->RegisterNamedService("time:u",
|
||||
std::make_shared<Time>(module, system, "time:u"));
|
||||
ServerManager::RunServer(std::move(server_manager));
|
||||
}
|
||||
|
||||
} // namespace Service::Time
|
||||
|
|
|
@ -46,7 +46,6 @@ public:
|
|||
};
|
||||
};
|
||||
|
||||
/// Registers all Time services with the specified service manager.
|
||||
void InstallInterfaces(Core::System& system);
|
||||
void LoopProcess(Core::System& system);
|
||||
|
||||
} // namespace Service::Time
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue