From b72d14a6ca4f6c8751e52651a1ec8d478f15a1f0 Mon Sep 17 00:00:00 2001 From: Baptiste Wicht Date: Sat, 9 Jul 2016 16:23:42 +0200 Subject: [PATCH] Reorder --- kernel/src/scheduler.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/kernel/src/scheduler.cpp b/kernel/src/scheduler.cpp index 4d8a9a43..18ded02f 100644 --- a/kernel/src/scheduler.cpp +++ b/kernel/src/scheduler.cpp @@ -582,7 +582,7 @@ uint64_t get_process_cr3(size_t pid){ } //end of extern "C" -void scheduler::init(){ //Create the idle task +void scheduler::init(){ //Init all the semaphores for(auto& lock : run_queue_locks){ lock.init(); @@ -594,13 +594,13 @@ void scheduler::init(){ //Create the idle task create_gc_task(); current_ticks = 0; - - //Run the init task by default - current_pid = 1; - pcb[current_pid].state = scheduler::process_state::RUNNING; } void scheduler::start(){ + //Run the init task by default + current_pid = 1; + pcb[current_pid].state = scheduler::process_state::RUNNING; + started = true; init_task_switch(current_pid);