Merge pull request #3402 from lioncash/sys-global

kernel/thread: Remove trivial usages of the global system accessor
master
bunnei 2020-02-12 10:10:00 +07:00 committed by GitHub
commit 2506f7b3a1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

@ -474,7 +474,7 @@ void Thread::AdjustSchedulingOnPriority(u32 old_priority) {
if (GetSchedulingStatus() != ThreadSchedStatus::Runnable) { if (GetSchedulingStatus() != ThreadSchedStatus::Runnable) {
return; return;
} }
auto& scheduler = Core::System::GetInstance().GlobalScheduler(); auto& scheduler = kernel.GlobalScheduler();
if (processor_id >= 0) { if (processor_id >= 0) {
scheduler.Unschedule(old_priority, static_cast<u32>(processor_id), this); scheduler.Unschedule(old_priority, static_cast<u32>(processor_id), this);
} }
@ -506,7 +506,7 @@ void Thread::AdjustSchedulingOnPriority(u32 old_priority) {
} }
void Thread::AdjustSchedulingOnAffinity(u64 old_affinity_mask, s32 old_core) { void Thread::AdjustSchedulingOnAffinity(u64 old_affinity_mask, s32 old_core) {
auto& scheduler = Core::System::GetInstance().GlobalScheduler(); auto& scheduler = kernel.GlobalScheduler();
if (GetSchedulingStatus() != ThreadSchedStatus::Runnable || if (GetSchedulingStatus() != ThreadSchedStatus::Runnable ||
current_priority >= THREADPRIO_COUNT) { current_priority >= THREADPRIO_COUNT) {
return; return;