Skip to content

Commit df0dd29

Browse files
ceolinkartben
authored andcommitted
samples: pref: Use __noinline attribute
Use Zephyr definition for noinline attribute. Signed-off-by: Flavio Ceolin <[email protected]>
1 parent f9d17b4 commit df0dd29

File tree

1 file changed

+6
-7
lines changed
  • samples/subsys/profiling/perf/src

1 file changed

+6
-7
lines changed

samples/subsys/profiling/perf/src/main.c

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,39 +5,38 @@
55
*/
66

77
#include <zephyr/kernel.h>
8+
#include <zephyr/toolchain.h>
89
#include <stdio.h>
910

1011
#define WAIT_KOEF 10000
1112

12-
#define NOINLINE __attribute__((noinline))
13-
14-
int NOINLINE func_0_0(void)
13+
int __noinline func_0_0(void)
1514
{
1615
k_busy_wait(1*WAIT_KOEF);
1716
return 0;
1817
}
1918

20-
int NOINLINE func_0_1(void)
19+
int __noinline func_0_1(void)
2120
{
2221
k_busy_wait(2*WAIT_KOEF);
2322
return 0;
2423
}
2524

26-
int NOINLINE func_0(void)
25+
int __noinline func_0(void)
2726
{
2827
k_busy_wait(1*WAIT_KOEF);
2928
func_0_0();
3029
func_0_1();
3130
return 0;
3231
}
3332

34-
int NOINLINE func_1(void)
33+
int __noinline func_1(void)
3534
{
3635
k_busy_wait(3*WAIT_KOEF);
3736
return 0;
3837
}
3938

40-
int NOINLINE func_2(void)
39+
int __noinline func_2(void)
4140
{
4241
k_busy_wait(4*WAIT_KOEF);
4342
return 0;

0 commit comments

Comments
 (0)