scheduler: Initialize class members directly where applicable
Reduces the overall amount of code.
This commit is contained in:
parent
2dc469ceba
commit
2fb0bbff29
|
@ -22,9 +22,9 @@
|
||||||
|
|
||||||
namespace Kernel {
|
namespace Kernel {
|
||||||
|
|
||||||
GlobalScheduler::GlobalScheduler(Core::System& system) : system{system} {
|
GlobalScheduler::GlobalScheduler(Core::System& system) : system{system} {}
|
||||||
is_reselection_pending = false;
|
|
||||||
}
|
GlobalScheduler::~GlobalScheduler() = default;
|
||||||
|
|
||||||
void GlobalScheduler::AddThread(SharedPtr<Thread> thread) {
|
void GlobalScheduler::AddThread(SharedPtr<Thread> thread) {
|
||||||
thread_list.push_back(std::move(thread));
|
thread_list.push_back(std::move(thread));
|
||||||
|
@ -357,8 +357,6 @@ void GlobalScheduler::Shutdown() {
|
||||||
thread_list.clear();
|
thread_list.clear();
|
||||||
}
|
}
|
||||||
|
|
||||||
GlobalScheduler::~GlobalScheduler() = default;
|
|
||||||
|
|
||||||
Scheduler::Scheduler(Core::System& system, Core::ARM_Interface& cpu_core, u32 core_id)
|
Scheduler::Scheduler(Core::System& system, Core::ARM_Interface& cpu_core, u32 core_id)
|
||||||
: system(system), cpu_core(cpu_core), core_id(core_id) {}
|
: system(system), cpu_core(cpu_core), core_id(core_id) {}
|
||||||
|
|
||||||
|
|
|
@ -150,7 +150,7 @@ private:
|
||||||
static constexpr u32 min_regular_priority = 2;
|
static constexpr u32 min_regular_priority = 2;
|
||||||
std::array<Common::MultiLevelQueue<Thread*, THREADPRIO_COUNT>, NUM_CPU_CORES> scheduled_queue;
|
std::array<Common::MultiLevelQueue<Thread*, THREADPRIO_COUNT>, NUM_CPU_CORES> scheduled_queue;
|
||||||
std::array<Common::MultiLevelQueue<Thread*, THREADPRIO_COUNT>, NUM_CPU_CORES> suggested_queue;
|
std::array<Common::MultiLevelQueue<Thread*, THREADPRIO_COUNT>, NUM_CPU_CORES> suggested_queue;
|
||||||
std::atomic<bool> is_reselection_pending;
|
std::atomic<bool> is_reselection_pending{false};
|
||||||
|
|
||||||
// The priority levels at which the global scheduler preempts threads every 10 ms. They are
|
// The priority levels at which the global scheduler preempts threads every 10 ms. They are
|
||||||
// ordered from Core 0 to Core 3.
|
// ordered from Core 0 to Core 3.
|
||||||
|
|
Loading…
Reference in New Issue