diff options
author | Luke T. Shumaker <lukeshu@lukeshu.com> | 2024-11-21 23:51:38 -0700 |
---|---|---|
committer | Luke T. Shumaker <lukeshu@lukeshu.com> | 2024-11-23 13:56:38 -0700 |
commit | 0615af6f4748e4f7dc6a4f034a9db636742cc3bd (patch) | |
tree | a0c09720ca4c8670869b56d03e57431b46073f75 /libcr/include | |
parent | 3064cb13577edd31d3a3ceb79b2bc72314ec208b (diff) |
Use C23 (C++11) attribute syntax instead of __attribute__
Diffstat (limited to 'libcr/include')
-rw-r--r-- | libcr/include/libcr/coroutine.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/libcr/include/libcr/coroutine.h b/libcr/include/libcr/coroutine.h index dc51a0f..86b8452 100644 --- a/libcr/include/libcr/coroutine.h +++ b/libcr/include/libcr/coroutine.h @@ -68,7 +68,7 @@ typedef size_t cid_t; * cr_rpc_*() and cr_chan_*() macros call these functions). */ typedef void (*cr_fn_t)(void *args); -#define COROUTINE __attribute__ ((noreturn)) void +#define COROUTINE __attribute__((noreturn)) void /* managing coroutines ********************************************************/ @@ -95,14 +95,14 @@ cid_t coroutine_add(const char *name, cr_fn_t fn, void *args); /** * The main scheduler loop. */ -__attribute__ ((noreturn)) void coroutine_main(void); +[[noreturn]] void coroutine_main(void); /* inside of coroutines *******************************************************/ /** cr_begin() goes at the beginning of a coroutine, after it has initialized its stack. */ void cr_begin( void); /** cr_exit() terminates the currently-running coroutine. */ -__attribute__ ((noreturn)) void cr_exit(void); +[[noreturn]] void cr_exit(void); /** cr_yield() switches to another coroutine (if there is another runnable coroutine to switch to). */ void cr_yield(void); /** cr_pause_and_yield() marks the current coroutine as not-runnable and switches to another coroutine. */ |