diff options
author | bunnei <bunneidev@gmail.com> | 2021-12-06 08:59:23 +0100 |
---|---|---|
committer | bunnei <bunneidev@gmail.com> | 2021-12-07 01:39:18 +0100 |
commit | 257d3c9ecf2730fad3b68918f108fa652061cabd (patch) | |
tree | 14a218758a3c74753d0f41c5864c2bb9d9635ed5 /src/core/hle/kernel/k_scheduler.cpp | |
parent | hle: kernel k_process: Remove unnecessary .at usage with thread pinning methods. (diff) | |
download | yuzu-257d3c9ecf2730fad3b68918f108fa652061cabd.tar yuzu-257d3c9ecf2730fad3b68918f108fa652061cabd.tar.gz yuzu-257d3c9ecf2730fad3b68918f108fa652061cabd.tar.bz2 yuzu-257d3c9ecf2730fad3b68918f108fa652061cabd.tar.lz yuzu-257d3c9ecf2730fad3b68918f108fa652061cabd.tar.xz yuzu-257d3c9ecf2730fad3b68918f108fa652061cabd.tar.zst yuzu-257d3c9ecf2730fad3b68918f108fa652061cabd.zip |
Diffstat (limited to 'src/core/hle/kernel/k_scheduler.cpp')
-rw-r--r-- | src/core/hle/kernel/k_scheduler.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/core/hle/kernel/k_scheduler.cpp b/src/core/hle/kernel/k_scheduler.cpp index d3b1b2419..277201de4 100644 --- a/src/core/hle/kernel/k_scheduler.cpp +++ b/src/core/hle/kernel/k_scheduler.cpp @@ -391,10 +391,12 @@ void KScheduler::EnableScheduling(KernelCore& kernel, u64 cores_needing_scheduli return; } - ASSERT(GetCurrentThreadPointer(kernel)->GetDisableDispatchCount() >= 1); + auto* current_thread = GetCurrentThreadPointer(kernel); - if (GetCurrentThreadPointer(kernel)->GetDisableDispatchCount() > 1) { - GetCurrentThreadPointer(kernel)->EnableDispatch(); + ASSERT(current_thread->GetDisableDispatchCount() >= 1); + + if (current_thread->GetDisableDispatchCount() > 1) { + current_thread->EnableDispatch(); } else { RescheduleCores(kernel, cores_needing_scheduling); } |