diff options
author | Nicholas Noll <nbnoll@eml.cc> | 2020-04-17 18:50:29 -0700 |
---|---|---|
committer | Nicholas Noll <nbnoll@eml.cc> | 2020-04-17 18:50:29 -0700 |
commit | 1d188c4f816fce8728fdffaa7ad6ef205ca05abd (patch) | |
tree | 8523aea864e0d2042c4494a181c910ec1948461d /include/u.h | |
parent | b7b3dece056794d7b840b71c25ad5ca5846cf231 (diff) |
chore: update naming & calling conventions
Diffstat (limited to 'include/u.h')
-rw-r--r-- | include/u.h | 9 |
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"
|