summaryrefslogtreecommitdiffstats
path: root/src/core/hle/kernel/kernel.cpp
diff options
context:
space:
mode:
authorlat9nq <lat9nq@gmail.com>2022-04-02 00:32:20 +0200
committerlat9nq <lat9nq@gmail.com>2022-04-04 03:47:57 +0200
commit5b5a1b7fa7470bd32b5481ae6a6cf5f4b07c80c8 (patch)
treeb5531cba3ca905a6561be6d77caec087183fe177 /src/core/hle/kernel/kernel.cpp
parentk_scheduler_lock: Fix data race (diff)
downloadyuzu-5b5a1b7fa7470bd32b5481ae6a6cf5f4b07c80c8.tar
yuzu-5b5a1b7fa7470bd32b5481ae6a6cf5f4b07c80c8.tar.gz
yuzu-5b5a1b7fa7470bd32b5481ae6a6cf5f4b07c80c8.tar.bz2
yuzu-5b5a1b7fa7470bd32b5481ae6a6cf5f4b07c80c8.tar.lz
yuzu-5b5a1b7fa7470bd32b5481ae6a6cf5f4b07c80c8.tar.xz
yuzu-5b5a1b7fa7470bd32b5481ae6a6cf5f4b07c80c8.tar.zst
yuzu-5b5a1b7fa7470bd32b5481ae6a6cf5f4b07c80c8.zip
Diffstat (limited to 'src/core/hle/kernel/kernel.cpp')
-rw-r--r--src/core/hle/kernel/kernel.cpp8
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 {
void InitializeCores() {
for (u32 core_id = 0; core_id < Core::Hardware::NUM_CPU_CORES; core_id++) {
- cores[core_id].Initialize(current_process->Is64BitProcess());
+ cores[core_id].Initialize((*current_process).Is64BitProcess());
system.Memory().SetCurrentPageTable(*current_process, core_id);
}
}
@@ -167,11 +167,11 @@ struct KernelCore::Impl {
// Shutdown all processes.
if (current_process) {
- current_process->Finalize();
+ (*current_process).Finalize();
// current_process->Close();
// TODO: The current process should be destroyed based on accurate ref counting after
// calling Close(). Adding a manual Destroy() call instead to avoid a memory leak.
- current_process->Destroy();
+ (*current_process).Destroy();
current_process = nullptr;
}
@@ -697,7 +697,7 @@ struct KernelCore::Impl {
// Lists all processes that exist in the current session.
std::vector<KProcess*> process_list;
- KProcess* current_process{};
+ std::atomic<KProcess*> current_process{};
std::unique_ptr<Kernel::GlobalSchedulerContext> global_scheduler_context;
Kernel::TimeManager time_manager;