summaryrefslogtreecommitdiffstats
path: root/src/core/hle/kernel/scheduler.cpp
diff options
context:
space:
mode:
authorFernando Sahmkow <fsahmkow27@gmail.com>2020-03-07 17:44:35 +0100
committerFernando Sahmkow <fsahmkow27@gmail.com>2020-06-27 17:35:33 +0200
commit83c7ba1ef700eff17f30b6c2782db77710dc322e (patch)
tree63b5901d96afa6a823a8a14859db84d6c74a283d /src/core/hle/kernel/scheduler.cpp
parentSCC: Small corrections to CancelSynchronization (diff)
downloadyuzu-83c7ba1ef700eff17f30b6c2782db77710dc322e.tar
yuzu-83c7ba1ef700eff17f30b6c2782db77710dc322e.tar.gz
yuzu-83c7ba1ef700eff17f30b6c2782db77710dc322e.tar.bz2
yuzu-83c7ba1ef700eff17f30b6c2782db77710dc322e.tar.lz
yuzu-83c7ba1ef700eff17f30b6c2782db77710dc322e.tar.xz
yuzu-83c7ba1ef700eff17f30b6c2782db77710dc322e.tar.zst
yuzu-83c7ba1ef700eff17f30b6c2782db77710dc322e.zip
Diffstat (limited to 'src/core/hle/kernel/scheduler.cpp')
-rw-r--r--src/core/hle/kernel/scheduler.cpp9
1 files changed, 4 insertions, 5 deletions
diff --git a/src/core/hle/kernel/scheduler.cpp b/src/core/hle/kernel/scheduler.cpp
index f020438fb..a37b992ec 100644
--- a/src/core/hle/kernel/scheduler.cpp
+++ b/src/core/hle/kernel/scheduler.cpp
@@ -417,8 +417,7 @@ void GlobalScheduler::AdjustSchedulingOnStatus(Thread* thread, u32 old_flags) {
}
ASSERT(is_locked);
- if (static_cast<ThreadSchedStatus>(old_flags & static_cast<u32>(ThreadSchedMasks::LowMask)) ==
- ThreadSchedStatus::Runnable) {
+ if (old_flags == static_cast<u32>(ThreadSchedStatus::Runnable)) {
// In this case the thread was running, now it's pausing/exitting
if (thread->processor_id >= 0) {
Unschedule(thread->current_priority, static_cast<u32>(thread->processor_id), thread);
@@ -430,7 +429,7 @@ void GlobalScheduler::AdjustSchedulingOnStatus(Thread* thread, u32 old_flags) {
Unsuggest(thread->current_priority, core, thread);
}
}
- } else if (thread->GetSchedulingStatus() == ThreadSchedStatus::Runnable) {
+ } else if (thread->scheduling_state == static_cast<u32>(ThreadSchedStatus::Runnable)) {
// The thread is now set to running from being stopped
if (thread->processor_id >= 0) {
Schedule(thread->current_priority, static_cast<u32>(thread->processor_id), thread);
@@ -448,7 +447,7 @@ void GlobalScheduler::AdjustSchedulingOnStatus(Thread* thread, u32 old_flags) {
}
void GlobalScheduler::AdjustSchedulingOnPriority(Thread* thread, u32 old_priority) {
- if (thread->GetSchedulingStatus() != ThreadSchedStatus::Runnable) {
+ if (thread->scheduling_state != static_cast<u32>(ThreadSchedStatus::Runnable)) {
return;
}
ASSERT(is_locked);
@@ -486,7 +485,7 @@ void GlobalScheduler::AdjustSchedulingOnPriority(Thread* thread, u32 old_priorit
void GlobalScheduler::AdjustSchedulingOnAffinity(Thread* thread, u64 old_affinity_mask,
s32 old_core) {
- if (thread->GetSchedulingStatus() != ThreadSchedStatus::Runnable ||
+ if (thread->scheduling_state != static_cast<u32>(ThreadSchedStatus::Runnable) ||
thread->current_priority >= THREADPRIO_COUNT) {
return;
}