From 0615af6f4748e4f7dc6a4f034a9db636742cc3bd Mon Sep 17 00:00:00 2001 From: "Luke T. Shumaker" Date: Thu, 21 Nov 2024 23:51:38 -0700 Subject: Use C23 (C++11) attribute syntax instead of __attribute__ --- libcr/include/libcr/coroutine.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'libcr/include') 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. */ -- cgit v1.2.3-2-g168b