Zephyr API Documentation 4.1.99
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)
 
#define MSEC_TO_CYCLES(msec)
 

Functions

 K_THREAD_STACK_ARRAY_DEFINE (worker_stacks, 8,(512+CONFIG_TEST_EXTRA_STACK_SIZE))
 
void worker (void *p1, void *p2, void *p3)
 
void test_deadline (void)
 
void yield_worker (void *p1, void *p2, void *p3)
 
void test_yield (void)
 
void unqueue_worker (void *p1, void *p2, void *p3)
 
void test_unqueued (void)
 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]
 
volatile struct k_threadexpected_thread
 
k_tid_t worker_tids [8]
 
int thread_deadlines [8]
 
int n_exec
 
int exec_order [8]
 

Macro Definition Documentation

◆ MSEC_TO_CYCLES

#define MSEC_TO_CYCLES ( msec)
Value:
(int)(((uint64_t)(msec) * \
(uint64_t)CONFIG_SYS_CLOCK_HW_CYCLES_PER_SEC) / \
#define MSEC_PER_SEC
number of milliseconds per second
Definition sys_clock.h:92
__UINT64_TYPE__ uint64_t
Definition stdint.h:91

◆ 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 ,
8 ,
(512+CONFIG_TEST_EXTRA_STACK_SIZE)  )

◆ test_deadline()

void test_deadline ( void )

◆ test_yield()

void test_yield ( void )

◆ 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_SUITE()

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

Variable Documentation

◆ exec_order

int exec_order[8]

◆ expected_thread

volatile struct k_thread* expected_thread

◆ 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]