Skip to content

Commit f9d17b4

Browse files
ceolinkartben
authored andcommitted
tests: mem_protect/protection: Use __noinline attribute
Use Zephyr definition for noinline attribute. Signed-off-by: Flavio Ceolin <[email protected]>
1 parent c9a7ba2 commit f9d17b4

File tree

1 file changed

+2
-1
lines changed
  • tests/kernel/mem_protect/protection/src

1 file changed

+2
-1
lines changed

tests/kernel/mem_protect/protection/src/main.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
#include <zephyr/ztest.h>
1212
#include <zephyr/kernel_structs.h>
1313
#include <zephyr/sys/barrier.h>
14+
#include <zephyr/toolchain.h>
1415
#include <string.h>
1516
#include <stdlib.h>
1617

@@ -49,7 +50,7 @@ void k_sys_fatal_error_handler(unsigned int reason, const struct arch_esf *pEsf)
4950
#define DO_BARRIERS() do { } while (0)
5051
#endif
5152

52-
static int __attribute__((noinline)) add_one(int i)
53+
static int __noinline add_one(int i)
5354
{
5455
return (i + 1);
5556
}

0 commit comments

Comments
 (0)