zircon/kernel/kernel/scheduler.cc
// Removes the thread at the head of the first eligible run queue. If there is
// an eligible deadline thread, it takes precedence over available fair
// threads.
Removes the thread at the head of the first eligible run queue. If there is
an eligible deadline thread, it takes precedence over available fair
threads.
Removes the thread at the head of the first eligible run queue . If there is an eligible deadline thread it takes precedence over available fair threads .
Thread* Scheduler::DequeueThread(SchedTime now) {
  if (IsDeadlineThreadEligible(now)) {
    return DequeueDeadlineThread(now);
  } else if (likely(!fair_run_queue_.is_empty())) {
    return DequeueFairThread();
  } else {
    return &percpu::Get(this_cpu()).idle_thread;
  }
}
Thread * Scheduler :: DequeueThread ( SchedTime now ) { if ( IsDeadlineThreadEligible ( now ) ) { return DequeueDeadlineThread ( now ) ; } else if ( likely ( ! fair_run_queue_ . is_empty ( ) ) ) { return DequeueFairThread ( ) ; } else { return & percpu :: Get ( this_cpu ( ) ) . idle_thread ; } }
Removes the thread at the head of the first eligible run queue.
Removes the thread at the head of the first eligible run queue .