1 /* 2 * Copyright (c) 2023 KNS Group LLC (YADRO) 3 * 4 * SPDX-License-Identifier: Apache-2.0 5 */ 6 7 #include <zephyr/kernel.h> 8 #include <zephyr/toolchain.h> 9 #include <stdio.h> 10 11 #define WAIT_KOEF 10000 12 func_0_0(void)13int __noinline func_0_0(void) 14 { 15 k_busy_wait(1*WAIT_KOEF); 16 return 0; 17 } 18 func_0_1(void)19int __noinline func_0_1(void) 20 { 21 k_busy_wait(2*WAIT_KOEF); 22 return 0; 23 } 24 func_0(void)25int __noinline func_0(void) 26 { 27 k_busy_wait(1*WAIT_KOEF); 28 func_0_0(); 29 func_0_1(); 30 return 0; 31 } 32 func_1(void)33int __noinline func_1(void) 34 { 35 k_busy_wait(3*WAIT_KOEF); 36 return 0; 37 } 38 func_2(void)39int __noinline func_2(void) 40 { 41 k_busy_wait(4*WAIT_KOEF); 42 return 0; 43 } 44 main(void)45int main(void) 46 { 47 while (1) { 48 k_usleep(1000); 49 func_0(); 50 func_1(); 51 func_2(); 52 } 53 return 0; 54 } 55