aboutsummaryrefslogtreecommitdiff
path: root/include/u.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/u.h')
-rw-r--r--include/u.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/include/u.h b/include/u.h
index 349a236..b7bd9ca 100644
--- a/include/u.h
+++ b/include/u.h
@@ -86,6 +86,15 @@ 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
#include "str.h"