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/jit | |
| 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/jit')
| -rw-r--r-- | src/core/hle/service/jit/jit.cpp | 12 | ||||
| -rw-r--r-- | src/core/hle/service/jit/jit.h | 7 |
2 files changed, 9 insertions, 10 deletions
diff --git a/src/core/hle/service/jit/jit.cpp b/src/core/hle/service/jit/jit.cpp index 47a1277ea..005c212dc 100644 --- a/src/core/hle/service/jit/jit.cpp +++ b/src/core/hle/service/jit/jit.cpp | |||
| @@ -9,6 +9,7 @@ | |||
| 9 | #include "core/hle/result.h" | 9 | #include "core/hle/result.h" |
| 10 | #include "core/hle/service/jit/jit.h" | 10 | #include "core/hle/service/jit/jit.h" |
| 11 | #include "core/hle/service/jit/jit_context.h" | 11 | #include "core/hle/service/jit/jit_context.h" |
| 12 | #include "core/hle/service/server_manager.h" | ||
| 12 | #include "core/hle/service/service.h" | 13 | #include "core/hle/service/service.h" |
| 13 | #include "core/memory.h" | 14 | #include "core/memory.h" |
| 14 | 15 | ||
| @@ -23,8 +24,8 @@ class IJitEnvironment final : public ServiceFramework<IJitEnvironment> { | |||
| 23 | public: | 24 | public: |
| 24 | explicit IJitEnvironment(Core::System& system_, Kernel::KProcess& process_, CodeRange user_rx, | 25 | explicit IJitEnvironment(Core::System& system_, Kernel::KProcess& process_, CodeRange user_rx, |
| 25 | CodeRange user_ro) | 26 | CodeRange user_ro) |
| 26 | : ServiceFramework{system_, "IJitEnvironment", ServiceThreadType::CreateNew}, | 27 | : ServiceFramework{system_, "IJitEnvironment"}, process{&process_}, context{ |
| 27 | process{&process_}, context{system_.Memory()} { | 28 | system_.Memory()} { |
| 28 | // clang-format off | 29 | // clang-format off |
| 29 | static const FunctionInfo functions[] = { | 30 | static const FunctionInfo functions[] = { |
| 30 | {0, &IJitEnvironment::GenerateCode, "GenerateCode"}, | 31 | {0, &IJitEnvironment::GenerateCode, "GenerateCode"}, |
| @@ -397,8 +398,11 @@ public: | |||
| 397 | } | 398 | } |
| 398 | }; | 399 | }; |
| 399 | 400 | ||
| 400 | void InstallInterfaces(SM::ServiceManager& sm, Core::System& system) { | 401 | void LoopProcess(Core::System& system) { |
| 401 | std::make_shared<JITU>(system)->InstallAsService(sm); | 402 | auto server_manager = std::make_unique<ServerManager>(system); |
| 403 | |||
| 404 | server_manager->RegisterNamedService("jit:u", std::make_shared<JITU>(system)); | ||
| 405 | ServerManager::RunServer(std::move(server_manager)); | ||
| 402 | } | 406 | } |
| 403 | 407 | ||
| 404 | } // namespace Service::JIT | 408 | } // namespace Service::JIT |
diff --git a/src/core/hle/service/jit/jit.h b/src/core/hle/service/jit/jit.h index af0f5b4f3..19014c75a 100644 --- a/src/core/hle/service/jit/jit.h +++ b/src/core/hle/service/jit/jit.h | |||
| @@ -7,13 +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::JIT { | 10 | namespace Service::JIT { |
| 15 | 11 | ||
| 16 | /// Registers all JIT services with the specified service manager. | 12 | void LoopProcess(Core::System& system); |
| 17 | void InstallInterfaces(SM::ServiceManager& sm, Core::System& system); | ||
| 18 | 13 | ||
| 19 | } // namespace Service::JIT | 14 | } // namespace Service::JIT |