diff options
author | Liam <byteslice@airmail.cc> | 2023-02-13 17:21:43 +0100 |
---|---|---|
committer | Liam <byteslice@airmail.cc> | 2023-02-14 01:03:12 +0100 |
commit | ceda2d280e8a3030c1e23083c5cea9158387fe4c (patch) | |
tree | 8041460840ed81d4cb74d87eecfb8fb720cdfa15 /src/core/core.cpp | |
parent | kernel: use GetCurrentProcess (diff) | |
download | yuzu-ceda2d280e8a3030c1e23083c5cea9158387fe4c.tar yuzu-ceda2d280e8a3030c1e23083c5cea9158387fe4c.tar.gz yuzu-ceda2d280e8a3030c1e23083c5cea9158387fe4c.tar.bz2 yuzu-ceda2d280e8a3030c1e23083c5cea9158387fe4c.tar.lz yuzu-ceda2d280e8a3030c1e23083c5cea9158387fe4c.tar.xz yuzu-ceda2d280e8a3030c1e23083c5cea9158387fe4c.tar.zst yuzu-ceda2d280e8a3030c1e23083c5cea9158387fe4c.zip |
Diffstat (limited to 'src/core/core.cpp')
-rw-r--r-- | src/core/core.cpp | 42 |
1 files changed, 21 insertions, 21 deletions
diff --git a/src/core/core.cpp b/src/core/core.cpp index 47292cd78..fb9b25d12 100644 --- a/src/core/core.cpp +++ b/src/core/core.cpp @@ -186,7 +186,7 @@ struct System::Impl { void Run() { std::unique_lock<std::mutex> lk(suspend_guard); - kernel.Suspend(false); + kernel.SuspendApplication(false); core_timing.SyncPause(false); is_paused.store(false, std::memory_order_relaxed); } @@ -195,7 +195,7 @@ struct System::Impl { std::unique_lock<std::mutex> lk(suspend_guard); core_timing.SyncPause(true); - kernel.Suspend(true); + kernel.SuspendApplication(true); is_paused.store(true, std::memory_order_relaxed); } @@ -203,17 +203,17 @@ struct System::Impl { return is_paused.load(std::memory_order_relaxed); } - std::unique_lock<std::mutex> StallProcesses() { + std::unique_lock<std::mutex> StallApplication() { std::unique_lock<std::mutex> lk(suspend_guard); - kernel.Suspend(true); + kernel.SuspendApplication(true); core_timing.SyncPause(true); return lk; } - void UnstallProcesses() { + void UnstallApplication() { if (!IsPaused()) { core_timing.SyncPause(false); - kernel.Suspend(false); + kernel.SuspendApplication(false); } } @@ -221,7 +221,7 @@ struct System::Impl { debugger = std::make_unique<Debugger>(system, port); } - SystemResultStatus SetupForMainProcess(System& system, Frontend::EmuWindow& emu_window) { + SystemResultStatus SetupForApplicationProcess(System& system, Frontend::EmuWindow& emu_window) { LOG_DEBUG(Core, "initialized OK"); // Setting changes may require a full system reinitialization (e.g., disabling multicore). @@ -273,7 +273,7 @@ struct System::Impl { return SystemResultStatus::ErrorGetLoader; } - SystemResultStatus init_result{SetupForMainProcess(system, emu_window)}; + SystemResultStatus init_result{SetupForApplicationProcess(system, emu_window)}; if (init_result != SystemResultStatus::Success) { LOG_CRITICAL(Core, "Failed to initialize system (Error {})!", static_cast<int>(init_result)); @@ -302,7 +302,7 @@ struct System::Impl { static_cast<u32>(SystemResultStatus::ErrorLoader) + static_cast<u32>(load_result)); } AddGlueRegistrationForProcess(*app_loader, *main_process); - kernel.MakeCurrentProcess(main_process); + kernel.MakeApplicationProcess(main_process); kernel.InitializeCores(); // Initialize cheat engine @@ -585,12 +585,12 @@ void System::DetachDebugger() { } } -std::unique_lock<std::mutex> System::StallProcesses() { - return impl->StallProcesses(); +std::unique_lock<std::mutex> System::StallApplication() { + return impl->StallApplication(); } -void System::UnstallProcesses() { - impl->UnstallProcesses(); +void System::UnstallApplication() { + impl->UnstallApplication(); } void System::InitializeDebugger() { @@ -648,8 +648,8 @@ const Kernel::GlobalSchedulerContext& System::GlobalSchedulerContext() const { return impl->kernel.GlobalSchedulerContext(); } -Kernel::KProcess* System::CurrentProcess() { - return impl->kernel.CurrentProcess(); +Kernel::KProcess* System::ApplicationProcess() { + return impl->kernel.ApplicationProcess(); } Core::DeviceMemory& System::DeviceMemory() { @@ -660,8 +660,8 @@ const Core::DeviceMemory& System::DeviceMemory() const { return *impl->device_memory; } -const Kernel::KProcess* System::CurrentProcess() const { - return impl->kernel.CurrentProcess(); +const Kernel::KProcess* System::ApplicationProcess() const { + return impl->kernel.ApplicationProcess(); } ARM_Interface& System::ArmInterface(std::size_t core_index) { @@ -760,8 +760,8 @@ const Core::SpeedLimiter& System::SpeedLimiter() const { return impl->speed_limiter; } -u64 System::GetCurrentProcessProgramID() const { - return impl->kernel.CurrentProcess()->GetProgramID(); +u64 System::GetApplicationProcessProgramID() const { + return impl->kernel.ApplicationProcess()->GetProgramID(); } Loader::ResultStatus System::GetGameName(std::string& out) const { @@ -880,11 +880,11 @@ bool System::GetExitLock() const { return impl->exit_lock; } -void System::SetCurrentProcessBuildID(const CurrentBuildProcessID& id) { +void System::SetApplicationProcessBuildID(const CurrentBuildProcessID& id) { impl->build_id = id; } -const System::CurrentBuildProcessID& System::GetCurrentProcessBuildID() const { +const System::CurrentBuildProcessID& System::GetApplicationProcessBuildID() const { return impl->build_id; } |