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

Macros

#define NUM_THREADS   8
 
#define STACK_SIZE   (512 + CONFIG_TEST_EXTRA_STACK_SIZE)
 

Functions

 K_THREAD_STACK_ARRAY_DEFINE (worker_stacks, 8,(512+CONFIG_TEST_EXTRA_STACK_SIZE))
 
void worker (void *p1, void *p2, void *p3)
 
 ZTEST (suite_deadline, test_deadline)
 
void yield_worker (void *p1, void *p2, void *p3)
 
 ZTEST (suite_deadline, test_yield)
 
void unqueue_worker (void *p1, void *p2, void *p3)
 
 ZTEST (suite_deadline, test_unqueued)
 Validate the behavior of deadline_set when the thread is not queued.
 
 ZTEST_SUITE (suite_deadline, NULL, NULL, NULL, NULL, NULL)
 

Variables

struct k_thread worker_threads [8]
 
k_tid_t worker_tids [8]
 
int thread_deadlines [8]
 
int n_exec
 
int exec_order [8]
 

Macro Definition Documentation

◆ NUM_THREADS

#define NUM_THREADS   8

◆ STACK_SIZE

#define STACK_SIZE   (512 + CONFIG_TEST_EXTRA_STACK_SIZE)

Function Documentation

◆ K_THREAD_STACK_ARRAY_DEFINE()

K_THREAD_STACK_ARRAY_DEFINE ( worker_stacks  ,
,
(512+CONFIG_TEST_EXTRA_STACK_SIZE)   
)

◆ unqueue_worker()

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

◆ worker()

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

◆ yield_worker()

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

◆ ZTEST() [1/2]

ZTEST ( suite_deadline  ,
test_deadline   
)

◆ ZTEST() [2/2]

ZTEST ( suite_deadline  ,
test_yield   
)

◆ ZTEST_SUITE()

ZTEST_SUITE ( suite_deadline  ,
NULL  ,
NULL  ,
NULL  ,
NULL  ,
NULL   
)

Variable Documentation

◆ exec_order

int exec_order[8]

◆ n_exec

int n_exec

◆ thread_deadlines

int thread_deadlines[8]

◆ worker_threads

struct k_thread worker_threads[8]

◆ worker_tids

k_tid_t worker_tids[8]