#include "debug.h" #include "kprintf.h" #include "task.h" #include "time.h" struct task *current_task; void scheduler(void) { if (!current_task) return; struct task *it = current_task->next; while (it && it->next != it && it->status != RUN) it = it->next; switch_to_task(it); }