diff options
| author | 2023-02-13 11:21:43 -0500 | |
|---|---|---|
| committer | 2023-02-13 19:03:12 -0500 | |
| commit | ceda2d280e8a3030c1e23083c5cea9158387fe4c (patch) | |
| tree | 8041460840ed81d4cb74d87eecfb8fb720cdfa15 /src/core/hle/kernel/kernel.cpp | |
| parent | kernel: use GetCurrentProcess (diff) | |
| download | yuzu-ceda2d280e8a3030c1e23083c5cea9158387fe4c.tar.gz yuzu-ceda2d280e8a3030c1e23083c5cea9158387fe4c.tar.xz yuzu-ceda2d280e8a3030c1e23083c5cea9158387fe4c.zip | |
general: rename CurrentProcess to ApplicationProcess
Diffstat (limited to 'src/core/hle/kernel/kernel.cpp')
| -rw-r--r-- | src/core/hle/kernel/kernel.cpp | 46 |
1 files changed, 23 insertions, 23 deletions
diff --git a/src/core/hle/kernel/kernel.cpp b/src/core/hle/kernel/kernel.cpp index 5b72eaaa1..b1922659d 100644 --- a/src/core/hle/kernel/kernel.cpp +++ b/src/core/hle/kernel/kernel.cpp | |||
| @@ -102,13 +102,13 @@ struct KernelCore::Impl { | |||
| 102 | 102 | ||
| 103 | void InitializeCores() { | 103 | void InitializeCores() { |
| 104 | for (u32 core_id = 0; core_id < Core::Hardware::NUM_CPU_CORES; core_id++) { | 104 | for (u32 core_id = 0; core_id < Core::Hardware::NUM_CPU_CORES; core_id++) { |
| 105 | cores[core_id]->Initialize((*current_process).Is64BitProcess()); | 105 | cores[core_id]->Initialize((*application_process).Is64BitProcess()); |
| 106 | system.Memory().SetCurrentPageTable(*current_process, core_id); | 106 | system.Memory().SetCurrentPageTable(*application_process, core_id); |
| 107 | } | 107 | } |
| 108 | } | 108 | } |
| 109 | 109 | ||
| 110 | void CloseCurrentProcess() { | 110 | void CloseApplicationProcess() { |
| 111 | KProcess* old_process = current_process.exchange(nullptr); | 111 | KProcess* old_process = application_process.exchange(nullptr); |
| 112 | if (old_process == nullptr) { | 112 | if (old_process == nullptr) { |
| 113 | return; | 113 | return; |
| 114 | } | 114 | } |
| @@ -182,7 +182,7 @@ struct KernelCore::Impl { | |||
| 182 | } | 182 | } |
| 183 | } | 183 | } |
| 184 | 184 | ||
| 185 | CloseCurrentProcess(); | 185 | CloseApplicationProcess(); |
| 186 | 186 | ||
| 187 | // Track kernel objects that were not freed on shutdown | 187 | // Track kernel objects that were not freed on shutdown |
| 188 | { | 188 | { |
| @@ -363,8 +363,8 @@ struct KernelCore::Impl { | |||
| 363 | } | 363 | } |
| 364 | } | 364 | } |
| 365 | 365 | ||
| 366 | void MakeCurrentProcess(KProcess* process) { | 366 | void MakeApplicationProcess(KProcess* process) { |
| 367 | current_process = process; | 367 | application_process = process; |
| 368 | } | 368 | } |
| 369 | 369 | ||
| 370 | static inline thread_local u32 host_thread_id = UINT32_MAX; | 370 | static inline thread_local u32 host_thread_id = UINT32_MAX; |
| @@ -821,7 +821,7 @@ struct KernelCore::Impl { | |||
| 821 | 821 | ||
| 822 | // Lists all processes that exist in the current session. | 822 | // Lists all processes that exist in the current session. |
| 823 | std::vector<KProcess*> process_list; | 823 | std::vector<KProcess*> process_list; |
| 824 | std::atomic<KProcess*> current_process{}; | 824 | std::atomic<KProcess*> application_process{}; |
| 825 | std::unique_ptr<Kernel::GlobalSchedulerContext> global_scheduler_context; | 825 | std::unique_ptr<Kernel::GlobalSchedulerContext> global_scheduler_context; |
| 826 | std::unique_ptr<Kernel::KHardwareTimer> hardware_timer; | 826 | std::unique_ptr<Kernel::KHardwareTimer> hardware_timer; |
| 827 | 827 | ||
| @@ -941,20 +941,20 @@ void KernelCore::AppendNewProcess(KProcess* process) { | |||
| 941 | impl->process_list.push_back(process); | 941 | impl->process_list.push_back(process); |
| 942 | } | 942 | } |
| 943 | 943 | ||
| 944 | void KernelCore::MakeCurrentProcess(KProcess* process) { | 944 | void KernelCore::MakeApplicationProcess(KProcess* process) { |
| 945 | impl->MakeCurrentProcess(process); | 945 | impl->MakeApplicationProcess(process); |
| 946 | } | 946 | } |
| 947 | 947 | ||
| 948 | KProcess* KernelCore::CurrentProcess() { | 948 | KProcess* KernelCore::ApplicationProcess() { |
| 949 | return impl->current_process; | 949 | return impl->application_process; |
| 950 | } | 950 | } |
| 951 | 951 | ||
| 952 | const KProcess* KernelCore::CurrentProcess() const { | 952 | const KProcess* KernelCore::ApplicationProcess() const { |
| 953 | return impl->current_process; | 953 | return impl->application_process; |
| 954 | } | 954 | } |
| 955 | 955 | ||
| 956 | void KernelCore::CloseCurrentProcess() { | 956 | void KernelCore::CloseApplicationProcess() { |
| 957 | impl->CloseCurrentProcess(); | 957 | impl->CloseApplicationProcess(); |
| 958 | } | 958 | } |
| 959 | 959 | ||
| 960 | const std::vector<KProcess*>& KernelCore::GetProcessList() const { | 960 | const std::vector<KProcess*>& KernelCore::GetProcessList() const { |
| @@ -1202,12 +1202,12 @@ const Kernel::KSharedMemory& KernelCore::GetHidBusSharedMem() const { | |||
| 1202 | return *impl->hidbus_shared_mem; | 1202 | return *impl->hidbus_shared_mem; |
| 1203 | } | 1203 | } |
| 1204 | 1204 | ||
| 1205 | void KernelCore::Suspend(bool suspended) { | 1205 | void KernelCore::SuspendApplication(bool suspended) { |
| 1206 | const bool should_suspend{exception_exited || suspended}; | 1206 | const bool should_suspend{exception_exited || suspended}; |
| 1207 | const auto activity = should_suspend ? ProcessActivity::Paused : ProcessActivity::Runnable; | 1207 | const auto activity = should_suspend ? ProcessActivity::Paused : ProcessActivity::Runnable; |
| 1208 | 1208 | ||
| 1209 | //! This refers to the application process, not the current process. | 1209 | // Get the application process. |
| 1210 | KScopedAutoObject<KProcess> process = CurrentProcess(); | 1210 | KScopedAutoObject<KProcess> process = ApplicationProcess(); |
| 1211 | if (process.IsNull()) { | 1211 | if (process.IsNull()) { |
| 1212 | return; | 1212 | return; |
| 1213 | } | 1213 | } |
| @@ -1218,8 +1218,8 @@ void KernelCore::Suspend(bool suspended) { | |||
| 1218 | // Wait for process execution to stop. | 1218 | // Wait for process execution to stop. |
| 1219 | bool must_wait{should_suspend}; | 1219 | bool must_wait{should_suspend}; |
| 1220 | 1220 | ||
| 1221 | // KernelCore::Suspend must be called from locked context, or we | 1221 | // KernelCore::SuspendApplication must be called from locked context, |
| 1222 | // could race another call to SetActivity, interfering with waiting. | 1222 | // or we could race another call to SetActivity, interfering with waiting. |
| 1223 | while (must_wait) { | 1223 | while (must_wait) { |
| 1224 | KScopedSchedulerLock sl{*this}; | 1224 | KScopedSchedulerLock sl{*this}; |
| 1225 | 1225 | ||
| @@ -1253,9 +1253,9 @@ bool KernelCore::IsShuttingDown() const { | |||
| 1253 | return impl->IsShuttingDown(); | 1253 | return impl->IsShuttingDown(); |
| 1254 | } | 1254 | } |
| 1255 | 1255 | ||
| 1256 | void KernelCore::ExceptionalExit() { | 1256 | void KernelCore::ExceptionalExitApplication() { |
| 1257 | exception_exited = true; | 1257 | exception_exited = true; |
| 1258 | Suspend(true); | 1258 | SuspendApplication(true); |
| 1259 | } | 1259 | } |
| 1260 | 1260 | ||
| 1261 | void KernelCore::EnterSVCProfile() { | 1261 | void KernelCore::EnterSVCProfile() { |