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

Macros

#define STACKSIZE   2048
 
#define THREAD_COUNT   64
 
#define VERBOSE   0
 

Functions

void alternate_thread (void *p1, void *p2, void *p3)
 
 K_THREAD_STACK_DEFINE (alt_thread_stack_area, 2048)
 
 ZTEST (stack_pointer_randomness, test_stack_pt_randomization)
 Test stack pointer randomization.
 
 ZTEST_SUITE (stack_pointer_randomness, NULL, NULL, ztest_simple_1cpu_before, ztest_simple_1cpu_after, NULL)
 

Variables

void * last_sp = (void *)0xFFFFFFFF
 
volatile unsigned int changed
 
static struct k_thread alt_thread_data
 

Macro Definition Documentation

◆ STACKSIZE

#define STACKSIZE   2048

◆ THREAD_COUNT

#define THREAD_COUNT   64

◆ VERBOSE

#define VERBOSE   0

Function Documentation

◆ alternate_thread()

void alternate_thread ( void *  p1,
void *  p2,
void *  p3 
)

◆ K_THREAD_STACK_DEFINE()

K_THREAD_STACK_DEFINE ( alt_thread_stack_area  ,
2048   
)

◆ ZTEST()

ZTEST ( stack_pointer_randomness  ,
test_stack_pt_randomization   
)

Test stack pointer randomization.

◆ ZTEST_SUITE()

ZTEST_SUITE ( stack_pointer_randomness  ,
NULL  ,
NULL  ,
ztest_simple_1cpu_before  ,
ztest_simple_1cpu_after  ,
NULL   
)

Variable Documentation

◆ alt_thread_data

struct k_thread alt_thread_data
static

◆ changed

volatile unsigned int changed

◆ last_sp

void* last_sp = (void *)0xFFFFFFFF