# scheduler use deque.h export process.h static deque q sched_init() deque_init(&q, sizeof(process *), 8) start(process *p) *(process **)deque_push(&q) = p run() while q.size step() step() process *p = *(process **)deque_element(&q, 0) deque_shift(&q) if resume(p) start(p)