samples: pref: Use __noinline attribute
Use Zephyr definition for noinline attribute. Signed-off-by: Flavio Ceolin <flavio.ceolin@gmail.com>
This commit is contained in:
parent
f9d17b4233
commit
df0dd2915d
1 changed files with 6 additions and 7 deletions
|
@ -5,25 +5,24 @@
|
|||
*/
|
||||
|
||||
#include <zephyr/kernel.h>
|
||||
#include <zephyr/toolchain.h>
|
||||
#include <stdio.h>
|
||||
|
||||
#define WAIT_KOEF 10000
|
||||
|
||||
#define NOINLINE __attribute__((noinline))
|
||||
|
||||
int NOINLINE func_0_0(void)
|
||||
int __noinline func_0_0(void)
|
||||
{
|
||||
k_busy_wait(1*WAIT_KOEF);
|
||||
return 0;
|
||||
}
|
||||
|
||||
int NOINLINE func_0_1(void)
|
||||
int __noinline func_0_1(void)
|
||||
{
|
||||
k_busy_wait(2*WAIT_KOEF);
|
||||
return 0;
|
||||
}
|
||||
|
||||
int NOINLINE func_0(void)
|
||||
int __noinline func_0(void)
|
||||
{
|
||||
k_busy_wait(1*WAIT_KOEF);
|
||||
func_0_0();
|
||||
|
@ -31,13 +30,13 @@ int NOINLINE func_0(void)
|
|||
return 0;
|
||||
}
|
||||
|
||||
int NOINLINE func_1(void)
|
||||
int __noinline func_1(void)
|
||||
{
|
||||
k_busy_wait(3*WAIT_KOEF);
|
||||
return 0;
|
||||
}
|
||||
|
||||
int NOINLINE func_2(void)
|
||||
int __noinline func_2(void)
|
||||
{
|
||||
k_busy_wait(4*WAIT_KOEF);
|
||||
return 0;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue