diff options
author | Luke T. Shumaker <lukeshu@lukeshu.com> | 2024-09-24 22:22:32 -0600 |
---|---|---|
committer | Luke T. Shumaker <lukeshu@lukeshu.com> | 2024-09-24 22:22:32 -0600 |
commit | 729663cb9d20b0d36b3ef6b689447390b94006df (patch) | |
tree | e91f6b82b5bf4f0265518820dbd7ffe4fcd2bb4c /coroutine.h | |
parent | 0b7bd5db8b2539d2e03b3a13b91ee6b21101460d (diff) |
wip config, 9p
Diffstat (limited to 'coroutine.h')
-rw-r--r-- | coroutine.h | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/coroutine.h b/coroutine.h index d02d0f9..4bdc4f8 100644 --- a/coroutine.h +++ b/coroutine.h @@ -29,10 +29,6 @@ #include <stddef.h> /* for size_t */ #include <stdbool.h> /* for bool */ -/* configuration **************************************************************/ - -#define COROUTINE_DEFAULT_STACK_SIZE (8*1024) - /* typedefs *******************************************************************/ /** @@ -94,7 +90,7 @@ cid_t coroutine_add_with_stack_size(size_t stack_size, cr_fn_t fn, void *args); * Like coroutine_add_with_stack_size(), but uses a default stack size so * you don't need to think about it. */ -#define coroutine_add(fn, args) coroutine_add_with_stack_size(COROUTINE_DEFAULT_STACK_SIZE, fn, args) +#define coroutine_add(fn, args) coroutine_add_with_stack_size(0, fn, args) /** * The main scheduler loop. @@ -109,7 +105,7 @@ void coroutine_main(void); /* inside of coroutines *******************************************************/ /** cr_begin() goes at the beginning of a coroutine, after it has initialized its stack. */ -bool cr_begin( void); +void cr_begin( void); /** cr_exit() terminates the currently-running coroutine. */ __attribute__ ((noreturn)) void cr_exit(void); /** cr_yield() switches to another coroutine (if there is another runnable coroutine to switch to). */ |