From 2fb0bbff29cc2f1330b773db2f57b09bf1476036 Mon Sep 17 00:00:00 2001 From: Lioncash Date: Sun, 27 Oct 2019 22:13:51 -0400 Subject: scheduler: Initialize class members directly where applicable Reduces the overall amount of code. --- src/core/hle/kernel/scheduler.cpp | 8 +++----- src/core/hle/kernel/scheduler.h | 2 +- 2 files changed, 4 insertions(+), 6 deletions(-) (limited to 'src/core') diff --git a/src/core/hle/kernel/scheduler.cpp b/src/core/hle/kernel/scheduler.cpp index 53281cc6c..8353308aa 100644 --- a/src/core/hle/kernel/scheduler.cpp +++ b/src/core/hle/kernel/scheduler.cpp @@ -22,9 +22,9 @@ namespace Kernel { -GlobalScheduler::GlobalScheduler(Core::System& system) : system{system} { - is_reselection_pending = false; -} +GlobalScheduler::GlobalScheduler(Core::System& system) : system{system} {} + +GlobalScheduler::~GlobalScheduler() = default; void GlobalScheduler::AddThread(SharedPtr thread) { thread_list.push_back(std::move(thread)); @@ -357,8 +357,6 @@ void GlobalScheduler::Shutdown() { thread_list.clear(); } -GlobalScheduler::~GlobalScheduler() = default; - Scheduler::Scheduler(Core::System& system, Core::ARM_Interface& cpu_core, u32 core_id) : system(system), cpu_core(cpu_core), core_id(core_id) {} diff --git a/src/core/hle/kernel/scheduler.h b/src/core/hle/kernel/scheduler.h index 8f1f39c59..74feecc06 100644 --- a/src/core/hle/kernel/scheduler.h +++ b/src/core/hle/kernel/scheduler.h @@ -150,7 +150,7 @@ private: static constexpr u32 min_regular_priority = 2; std::array, NUM_CPU_CORES> scheduled_queue; std::array, NUM_CPU_CORES> suggested_queue; - std::atomic is_reselection_pending; + std::atomic is_reselection_pending{false}; // The priority levels at which the global scheduler preempts threads every 10 ms. They are // ordered from Core 0 to Core 3. -- cgit v1.2.3