diff options
author | Luke T. Shumaker <lukeshu@lukeshu.com> | 2024-09-22 02:52:21 -0600 |
---|---|---|
committer | Luke T. Shumaker <lukeshu@lukeshu.com> | 2024-09-22 02:52:21 -0600 |
commit | e2a29828cdd5c68f70ee771bb9f73c4b03c59529 (patch) | |
tree | 2f099d58239fec5730e5e00f9c75f16d4350833e | |
parent | 8ae41297e21c96793ab1f2c8d1abcc5f274501e2 (diff) |
drop no_slit_stack, use rely on -fno-split-stack
-rw-r--r-- | coroutine.c | 2 | ||||
-rw-r--r-- | coroutine.h | 14 |
2 files changed, 8 insertions, 8 deletions
diff --git a/coroutine.c b/coroutine.c index 97d5be6..2c265a3 100644 --- a/coroutine.c +++ b/coroutine.c @@ -326,7 +326,7 @@ bool cr_begin(void) { longjmp(coroutine_add_env, 1); /* jump to point=a */ } -static inline __attribute__ ((no_split_stack)) void _cr_transition(enum coroutine_state state) { +static inline void _cr_transition(enum coroutine_state state) { assert_cid_state(coroutine_running, == CR_RUNNING); debugf("cid=%zu: transition %i->%i\n", coroutine_running, coroutine_table[coroutine_running-1].state, state); 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 |