From 1d188c4f816fce8728fdffaa7ad6ef205ca05abd Mon Sep 17 00:00:00 2001 From: Nicholas Noll Date: Fri, 17 Apr 2020 18:50:29 -0700 Subject: chore: update naming & calling conventions --- include/u.h | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'include/u.h') diff --git a/include/u.h b/include/u.h index 349a236..b7bd9ca 100644 --- a/include/u.h +++ b/include/u.h @@ -85,6 +85,15 @@ typedef struct bufHdr void* bufgrow(void*, vlong, vlong); void _bufpop(void*, int, vlong); +// ----------------------------------------------------------------------------- +// Co-routines + +typedef struct coro coro; + +coro* coro·new(uintptr stk, uintptr (*func)(coro* c, uintptr)); +uintptr coro·yield(coro* c, uintptr arg); +error coro·free(coro* c); + // ----------------------------------------------------------------------------- // Strings -- cgit v1.2.1