diff --git a/src/task/sched.rs b/src/task/sched.rs index 0c498cc1..cd6e5f91 100644 --- a/src/task/sched.rs +++ b/src/task/sched.rs @@ -115,20 +115,7 @@ impl CpuQueue { // Start from idle thread to avoid having a Rc stuck here without getting dropped let t = CNTPCT_EL0.get(); self.lock().stats.measure_time = t; - - let mut inner = self.inner.lock(); - if let Some(proc) = inner.next_ready_task() { - inner.queue.push_back(proc.clone()); - inner.current = Some(proc.clone()); - proc.set_running(Cpu::local_id()); - - drop(inner); - proc.context().enter(); - } else { - drop(inner); - - self.idle.enter(); - }; + self.idle.enter() } /// Yields CPU execution to the next task in queue (or idle task if there aren't any). @@ -177,6 +164,7 @@ impl CpuQueue { (&self.idle, 0) }; + // log_print_raw!(crate::debug::LogLevel::Info, "{}: ", Cpu::local_id()); // if let Some(from) = current.as_ref() { // log_print_raw!(crate::debug::LogLevel::Info, "{}", from.id()); // } else {