1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
#pragma once #include <u.h> #include <base.h> extern void _newcoro(Coro *co, uintptr (*func)(Coro*, uintptr), void *stk); extern uintptr _coroyield(Coro *co, uintptr arg); struct Coro { void *sp; void *bp; uintptr size; void *user; };