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 34da7c23b..caa91a509 100644 --- a/src/core/hle/kernel/kernel.cpp +++ b/src/core/hle/kernel/kernel.cpp | |||
| @@ -84,7 +84,7 @@ struct KernelCore::Impl { | |||
| 84 | 84 | ||
| 85 | void InitializeCores() { | 85 | void InitializeCores() { |
| 86 | for (u32 core_id = 0; core_id < Core::Hardware::NUM_CPU_CORES; core_id++) { | 86 | for (u32 core_id = 0; core_id < Core::Hardware::NUM_CPU_CORES; core_id++) { |
| 87 | cores[core_id].Initialize(current_process->Is64BitProcess()); | 87 | cores[core_id].Initialize((*current_process).Is64BitProcess()); |
| 88 | system.Memory().SetCurrentPageTable(*current_process, core_id); | 88 | system.Memory().SetCurrentPageTable(*current_process, core_id); |
| 89 | } | 89 | } |
| 90 | } | 90 | } |
| @@ -167,11 +167,11 @@ struct KernelCore::Impl { | |||
| 167 | 167 | ||
| 168 | // Shutdown all processes. | 168 | // Shutdown all processes. |
| 169 | if (current_process) { | 169 | if (current_process) { |
| 170 | current_process->Finalize(); | 170 | (*current_process).Finalize(); |
| 171 | // current_process->Close(); | 171 | // current_process->Close(); |
| 172 | // TODO: The current process should be destroyed based on accurate ref counting after | 172 | // TODO: The current process should be destroyed based on accurate ref counting after |
| 173 | // calling Close(). Adding a manual Destroy() call instead to avoid a memory leak. | 173 | // calling Close(). Adding a manual Destroy() call instead to avoid a memory leak. |
| 174 | current_process->Destroy(); | 174 | (*current_process).Destroy(); |
| 175 | current_process = nullptr; | 175 | current_process = nullptr; |
| 176 | } | 176 | } |
| 177 | 177 | ||
| @@ -697,7 +697,7 @@ struct KernelCore::Impl { | |||
| 697 | 697 | ||
| 698 | // Lists all processes that exist in the current session. | 698 | // Lists all processes that exist in the current session. |
| 699 | std::vector<KProcess*> process_list; | 699 | std::vector<KProcess*> process_list; |
| 700 | KProcess* current_process{}; | 700 | std::atomic<KProcess*> current_process{}; |
| 701 | std::unique_ptr<Kernel::GlobalSchedulerContext> global_scheduler_context; | 701 | std::unique_ptr<Kernel::GlobalSchedulerContext> global_scheduler_context; |
| 702 | Kernel::TimeManager time_manager; | 702 | Kernel::TimeManager time_manager; |
| 703 | 703 | ||