diff options
Diffstat (limited to 'src/core/hle/kernel/kernel.cpp')
| -rw-r--r-- | src/core/hle/kernel/kernel.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/core/hle/kernel/kernel.cpp b/src/core/hle/kernel/kernel.cpp index 134a0b8e9..481a0d7cb 100644 --- a/src/core/hle/kernel/kernel.cpp +++ b/src/core/hle/kernel/kernel.cpp | |||
| @@ -85,7 +85,7 @@ struct KernelCore::Impl { | |||
| 85 | 85 | ||
| 86 | void InitializeCores() { | 86 | void InitializeCores() { |
| 87 | for (u32 core_id = 0; core_id < Core::Hardware::NUM_CPU_CORES; core_id++) { | 87 | for (u32 core_id = 0; core_id < Core::Hardware::NUM_CPU_CORES; core_id++) { |
| 88 | cores[core_id].Initialize(current_process->Is64BitProcess()); | 88 | cores[core_id].Initialize((*current_process).Is64BitProcess()); |
| 89 | system.Memory().SetCurrentPageTable(*current_process, core_id); | 89 | system.Memory().SetCurrentPageTable(*current_process, core_id); |
| 90 | } | 90 | } |
| 91 | } | 91 | } |
| @@ -168,11 +168,11 @@ struct KernelCore::Impl { | |||
| 168 | 168 | ||
| 169 | // Shutdown all processes. | 169 | // Shutdown all processes. |
| 170 | if (current_process) { | 170 | if (current_process) { |
| 171 | current_process->Finalize(); | 171 | (*current_process).Finalize(); |
| 172 | // current_process->Close(); | 172 | // current_process->Close(); |
| 173 | // TODO: The current process should be destroyed based on accurate ref counting after | 173 | // TODO: The current process should be destroyed based on accurate ref counting after |
| 174 | // calling Close(). Adding a manual Destroy() call instead to avoid a memory leak. | 174 | // calling Close(). Adding a manual Destroy() call instead to avoid a memory leak. |
| 175 | current_process->Destroy(); | 175 | (*current_process).Destroy(); |
| 176 | current_process = nullptr; | 176 | current_process = nullptr; |
| 177 | } | 177 | } |
| 178 | 178 | ||
| @@ -704,7 +704,7 @@ struct KernelCore::Impl { | |||
| 704 | 704 | ||
| 705 | // Lists all processes that exist in the current session. | 705 | // Lists all processes that exist in the current session. |
| 706 | std::vector<KProcess*> process_list; | 706 | std::vector<KProcess*> process_list; |
| 707 | KProcess* current_process{}; | 707 | std::atomic<KProcess*> current_process{}; |
| 708 | std::unique_ptr<Kernel::GlobalSchedulerContext> global_scheduler_context; | 708 | std::unique_ptr<Kernel::GlobalSchedulerContext> global_scheduler_context; |
| 709 | Kernel::TimeManager time_manager; | 709 | Kernel::TimeManager time_manager; |
| 710 | 710 | ||