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/kernel/smp.h>
#include <zephyr/ztest.h>

Macros

#define CPU_START_DELAY   10000
 
#define CPU_IPI_DELAY   1000
 
#define STACKSZ   2048
 

Functions

 K_THREAD_STACK_DEFINE (thr_stack, 2048)
 
static void thread_fn (void *a, void *b, void *c)
 
 ZTEST (smp_boot_delay, test_smp_boot_delay)
 
void custom_init_fn (void *arg)
 
 ZTEST (smp_boot_delay, test_smp_custom_start)
 
 ZTEST_SUITE (smp_boot_delay, NULL, NULL, NULL, NULL, NULL)
 

Variables

char stack [2048]
 
volatile bool mp_flag
 
struct k_thread cpu_thr
 
volatile bool custom_init_flag
 

Macro Definition Documentation

◆ CPU_IPI_DELAY

#define CPU_IPI_DELAY   1000

◆ CPU_START_DELAY

#define CPU_START_DELAY   10000

◆ STACKSZ

#define STACKSZ   2048

Function Documentation

◆ custom_init_fn()

void custom_init_fn ( void *  arg)

◆ K_THREAD_STACK_DEFINE()

K_THREAD_STACK_DEFINE ( thr_stack  ,
2048   
)

◆ thread_fn()

static void thread_fn ( void *  a,
void *  b,
void *  c 
)
static

◆ ZTEST() [1/2]

ZTEST ( smp_boot_delay  ,
test_smp_boot_delay   
)

◆ ZTEST() [2/2]

ZTEST ( smp_boot_delay  ,
test_smp_custom_start   
)

◆ ZTEST_SUITE()

ZTEST_SUITE ( smp_boot_delay  ,
NULL  ,
NULL  ,
NULL  ,
NULL  ,
NULL   
)

Variable Documentation

◆ cpu_thr

struct k_thread cpu_thr

◆ custom_init_flag

volatile bool custom_init_flag

◆ mp_flag

volatile bool mp_flag

◆ stack

char stack[2048]