Zephyr Project API 3.7.0
A Scalable Open Source RTOS
Loading...
Searching...
No Matches
main.c File Reference
#include <zephyr/kernel.h>
#include <zephyr/device.h>
#include <zephyr/ztest.h>

Macros

#define IDX_PRE_KERNEL_1   0
 
#define IDX_PRE_KERNEL_2   1
 
#define IDX_POST_KERNEL   2
 
#define SYS_INIT_CREATE(level)
 

Functions

 ZTEST (no_multithreading, test_k_busy_wait)
 
static void timeout_handler (struct k_timer *timer)
 
 K_TIMER_DEFINE (timer, timeout_handler, NULL)
 
 ZTEST (no_multithreading, test_irq_locking)
 
 ZTEST (no_multithreading, test_cpu_idle)
 
 FOR_EACH (SYS_INIT_CREATE,(;), PRE_KERNEL_1, PRE_KERNEL_2, POST_KERNEL)
 
 ZTEST (no_multithreading, test_sys_init)
 
 ZTEST_SUITE (no_multithreading, NULL, NULL, NULL, NULL, NULL)
 

Variables

static int init_order
 
static int sys_init_result
 

Macro Definition Documentation

◆ IDX_POST_KERNEL

#define IDX_POST_KERNEL   2

◆ IDX_PRE_KERNEL_1

#define IDX_PRE_KERNEL_1   0

◆ IDX_PRE_KERNEL_2

#define IDX_PRE_KERNEL_2   1

◆ SYS_INIT_CREATE

#define SYS_INIT_CREATE (   level)
Value:
static int pre_kernel_##level##_init_func(void) \
{ \
if (init_order != IDX_##level && sys_init_result == 0) { \
return -EIO; \
} \
return 0;\
} \
SYS_INIT(pre_kernel_##level##_init_func, level, 0)
#define EIO
I/O error.
Definition errno.h:43
static int init_order
Definition main.c:94
static int sys_init_result
Definition main.c:95

Function Documentation

◆ FOR_EACH()

FOR_EACH ( SYS_INIT_CREATE  ,
(;)  ,
PRE_KERNEL_1  ,
PRE_KERNEL_2  ,
POST_KERNEL   
)

◆ K_TIMER_DEFINE()

K_TIMER_DEFINE ( timer  ,
timeout_handler  ,
NULL   
)

◆ timeout_handler()

static void timeout_handler ( struct k_timer *  timer)
static

◆ ZTEST() [1/4]

ZTEST ( no_multithreading  ,
test_cpu_idle   
)

◆ ZTEST() [2/4]

ZTEST ( no_multithreading  ,
test_irq_locking   
)

◆ ZTEST() [3/4]

ZTEST ( no_multithreading  ,
test_k_busy_wait   
)

◆ ZTEST() [4/4]

ZTEST ( no_multithreading  ,
test_sys_init   
)

◆ ZTEST_SUITE()

ZTEST_SUITE ( no_multithreading  ,
NULL  ,
NULL  ,
NULL  ,
NULL  ,
NULL   
)

Variable Documentation

◆ init_order

int init_order
static

◆ sys_init_result

int sys_init_result
static