summaryrefslogtreecommitdiff
path: root/coroutine.h
diff options
context:
space:
mode:
authorLuke T. Shumaker <lukeshu@lukeshu.com>2024-09-22 02:52:21 -0600
committerLuke T. Shumaker <lukeshu@lukeshu.com>2024-09-22 02:52:21 -0600
commite2a29828cdd5c68f70ee771bb9f73c4b03c59529 (patch)
tree2f099d58239fec5730e5e00f9c75f16d4350833e /coroutine.h
parent8ae41297e21c96793ab1f2c8d1abcc5f274501e2 (diff)
drop no_slit_stack, use rely on -fno-split-stack
Diffstat (limited to 'coroutine.h')
-rw-r--r--coroutine.h14
1 files changed, 7 insertions, 7 deletions
diff --git a/coroutine.h b/coroutine.h
index afe1b1a..d34ff2e 100644
--- a/coroutine.h
+++ b/coroutine.h
@@ -69,7 +69,7 @@ typedef size_t cid_t;
* cr_chan_*() macros call these functions).
*/
typedef void (*cr_fn_t)(void *args);
-#define COROUTINE __attribute__ ((noreturn, no_split_stack)) void
+#define COROUTINE __attribute__ ((noreturn)) void
/* managing coroutines ********************************************************/
@@ -85,7 +85,7 @@ typedef void (*cr_fn_t)(void *args);
* Returns the cid of the newly-created coroutine. May return 0 if
* there are already COROUTINE_NUM active coroutines.
*/
-__attribute__ ((no_split_stack)) cid_t coroutine_add_with_stack_size(size_t stack_size, cr_fn_t fn, void *args);
+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
@@ -106,15 +106,15 @@ void coroutine_main(void);
/* inside of coroutines *******************************************************/
/** cr_begin() goes at the beginning of a coroutine, after it has initialized its stack. */
-__attribute__ ((no_split_stack)) bool cr_begin( void);
+bool cr_begin( void);
/** cr_exit() terminates the currently-running coroutine. */
-__attribute__ ((no_split_stack, noreturn)) void cr_exit(void);
+__attribute__ ((noreturn)) void cr_exit(void);
/** cr_yield() switches to another coroutine (if there is another runnable coroutine to switch to). */
-__attribute__ ((no_split_stack)) void cr_yield(void);
+void cr_yield(void);
/** cr_pause_and_yield() marks the current coroutine as not-runnable and switches to another coroutine. */
-__attribute__ ((no_split_stack)) void cr_pause_and_yield(void);
+void cr_pause_and_yield(void);
/** cr_unpause() marks a coroutine as runnable that has previously marked itself as non-runnable with cr_pause_and_yield(). */
-__attribute__ ((no_split_stack)) void cr_unpause(cid_t);
+void cr_unpause(cid_t);
/** cr_end() is a counterpart to cr_begin(), but is really just cr_exit(). */
#define cr_end cr_exit