tests: mem_protect/protection: Use __noinline attribute

Use Zephyr definition for noinline attribute.

Signed-off-by: Flavio Ceolin <flavio.ceolin@gmail.com>
This commit is contained in:
Flavio Ceolin 2024-11-27 09:50:35 -08:00 committed by Benjamin Cabé
commit f9d17b4233

View file

@ -11,6 +11,7 @@
#include <zephyr/ztest.h>
#include <zephyr/kernel_structs.h>
#include <zephyr/sys/barrier.h>
#include <zephyr/toolchain.h>
#include <string.h>
#include <stdlib.h>
@ -49,7 +50,7 @@ void k_sys_fatal_error_handler(unsigned int reason, const struct arch_esf *pEsf)
#define DO_BARRIERS() do { } while (0)
#endif
static int __attribute__((noinline)) add_one(int i)
static int __noinline add_one(int i)
{
return (i + 1);
}