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