summaryrefslogtreecommitdiff
path: root/coroutine.h
diff options
context:
space:
mode:
Diffstat (limited to 'coroutine.h')
-rw-r--r--coroutine.h8
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). */