diff options
author | Ian Moffett <ian@osmora.org> | 2025-03-19 20:22:56 -0400 |
---|---|---|
committer | Ian Moffett <ian@osmora.org> | 2025-03-19 20:22:56 -0400 |
commit | beeb9ff5f6e389ec7041721fdc4adaf6603b529a (patch) | |
tree | 2e4d02b815e7a9dbd20aa242606901447815cc20 /sys/include | |
parent | f70322f7eac222c57b74c04ff5922c4668369778 (diff) |
kernel: cdefs: Introduce __cold and __dead_cold
The __cold macro is used for code paths that are rarley taken while the
__dead_cold macro is used for __cold routines that never return.
Signed-off-by: Ian Moffett <ian@osmora.org>
Diffstat (limited to 'sys/include')
-rw-r--r-- | sys/include/sys/cdefs.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/sys/include/sys/cdefs.h b/sys/include/sys/cdefs.h index 37e15d7..777e72a 100644 --- a/sys/include/sys/cdefs.h +++ b/sys/include/sys/cdefs.h @@ -37,6 +37,8 @@ #define __always_inline __attribute__((__always_inline__)) #define __packed __attribute__((__packed__)) #define __dead __attribute__((__noreturn__)) +#define __cold __attribute__((__cold__)) +#define __dead_cold __attribute__((__noreturn__, __cold__)) #define __unused __attribute__((__unused__)) #define __nothing ((void)0) #define __likely(exp) __builtin_expect(((exp) != 0), 1) |