[][src]Static sunrise_kernel::scheduler::SCHEDULE_QUEUE

static SCHEDULE_QUEUE: SpinLockIRQ<Vec<Arc<ThreadStruct>>>

The schedule queue

It's a simple vec, acting as a round-robin, first element is the running thread. When its time slice has ended, it is rotated to the end of the vec, and we go on to the next one.

The vec is protected by a SpinLockIRQ, so accessing/modifying it disables irqs. Since there's no SMP, this should guarantee we cannot deadlock in the scheduler.