diff options
author | Liam <byteslice@airmail.cc> | 2023-02-13 16:44:41 +0100 |
---|---|---|
committer | Liam <byteslice@airmail.cc> | 2023-02-13 17:05:14 +0100 |
commit | 4363ca304afb0b615481c7d49e863a2c429cc5c6 (patch) | |
tree | 80dbba25e98a8493944993f8992326b797305088 /src/core/hle/kernel/k_scheduler.cpp | |
parent | Merge pull request #9784 from m-HD/master (diff) | |
download | yuzu-4363ca304afb0b615481c7d49e863a2c429cc5c6.tar yuzu-4363ca304afb0b615481c7d49e863a2c429cc5c6.tar.gz yuzu-4363ca304afb0b615481c7d49e863a2c429cc5c6.tar.bz2 yuzu-4363ca304afb0b615481c7d49e863a2c429cc5c6.tar.lz yuzu-4363ca304afb0b615481c7d49e863a2c429cc5c6.tar.xz yuzu-4363ca304afb0b615481c7d49e863a2c429cc5c6.tar.zst yuzu-4363ca304afb0b615481c7d49e863a2c429cc5c6.zip |
Diffstat (limited to 'src/core/hle/kernel/k_scheduler.cpp')
-rw-r--r-- | src/core/hle/kernel/k_scheduler.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/core/hle/kernel/k_scheduler.cpp b/src/core/hle/kernel/k_scheduler.cpp index d6676904b..d6c214237 100644 --- a/src/core/hle/kernel/k_scheduler.cpp +++ b/src/core/hle/kernel/k_scheduler.cpp @@ -328,7 +328,7 @@ u64 KScheduler::UpdateHighestPriorityThreadsImpl(KernelCore& kernel) { } void KScheduler::SwitchThread(KThread* next_thread) { - KProcess* const cur_process = kernel.CurrentProcess(); + KProcess* const cur_process = GetCurrentProcessPointer(kernel); KThread* const cur_thread = GetCurrentThreadPointer(kernel); // We never want to schedule a null thread, so use the idle thread if we don't have a next. @@ -689,11 +689,11 @@ void KScheduler::RotateScheduledQueue(KernelCore& kernel, s32 core_id, s32 prior void KScheduler::YieldWithoutCoreMigration(KernelCore& kernel) { // Validate preconditions. ASSERT(CanSchedule(kernel)); - ASSERT(kernel.CurrentProcess() != nullptr); + ASSERT(GetCurrentProcessPointer(kernel) != nullptr); // Get the current thread and process. KThread& cur_thread = GetCurrentThread(kernel); - KProcess& cur_process = *kernel.CurrentProcess(); + KProcess& cur_process = GetCurrentProcess(kernel); // If the thread's yield count matches, there's nothing for us to do. if (cur_thread.GetYieldScheduleCount() == cur_process.GetScheduledCount()) { @@ -728,11 +728,11 @@ void KScheduler::YieldWithoutCoreMigration(KernelCore& kernel) { void KScheduler::YieldWithCoreMigration(KernelCore& kernel) { // Validate preconditions. ASSERT(CanSchedule(kernel)); - ASSERT(kernel.CurrentProcess() != nullptr); + ASSERT(GetCurrentProcessPointer(kernel) != nullptr); // Get the current thread and process. KThread& cur_thread = GetCurrentThread(kernel); - KProcess& cur_process = *kernel.CurrentProcess(); + KProcess& cur_process = GetCurrentProcess(kernel); // If the thread's yield count matches, there's nothing for us to do. if (cur_thread.GetYieldScheduleCount() == cur_process.GetScheduledCount()) { @@ -816,11 +816,11 @@ void KScheduler::YieldWithCoreMigration(KernelCore& kernel) { void KScheduler::YieldToAnyThread(KernelCore& kernel) { // Validate preconditions. ASSERT(CanSchedule(kernel)); - ASSERT(kernel.CurrentProcess() != nullptr); + ASSERT(GetCurrentProcessPointer(kernel) != nullptr); // Get the current thread and process. KThread& cur_thread = GetCurrentThread(kernel); - KProcess& cur_process = *kernel.CurrentProcess(); + KProcess& cur_process = GetCurrentProcess(kernel); // If the thread's yield count matches, there's nothing for us to do. if (cur_thread.GetYieldScheduleCount() == cur_process.GetScheduledCount()) { |