From ee050e27a6d404c5712eaeca3df9c21c893e673b Mon Sep 17 00:00:00 2001 From: Flavio Ceolin Date: Wed, 27 Nov 2024 09:41:57 -0800 Subject: [PATCH] toolchain: Add __noinline attribute Add a new attribute to instruct the compiler to not inline a function. Signed-off-by: Flavio Ceolin --- include/zephyr/toolchain/gcc.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/include/zephyr/toolchain/gcc.h b/include/zephyr/toolchain/gcc.h index b592eb021e2..8978f1ea51d 100644 --- a/include/zephyr/toolchain/gcc.h +++ b/include/zephyr/toolchain/gcc.h @@ -225,6 +225,10 @@ do { \ #define __aligned(x) __attribute__((__aligned__(x))) #endif +#ifndef __noinline +#define __noinline __attribute__((noinline)) +#endif + #define __may_alias __attribute__((__may_alias__)) #ifndef __printf_like