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

Macros

#define NUM_THREAD   2
 
#define ITERATION_COUNT   5
 
#define BASE_PRIORITY   1
 

Functions

static K_SEM_DEFINE (sema2, 0, 2)
 
static K_SEM_DEFINE (sema3, 0, 2)
 
static void thread_tslice (void *p1, void *p2, void *p3)
 
 ZTEST (threads_scheduling, test_priority_scheduling)
 Check the behavior of preemptive threads with different priorities.
 

Variables

static int thread_idx
 
static struct k_thread t [2]
 

Macro Definition Documentation

◆ BASE_PRIORITY

#define BASE_PRIORITY   1

◆ ITERATION_COUNT

#define ITERATION_COUNT   5

◆ NUM_THREAD

#define NUM_THREAD   2

Function Documentation

◆ K_SEM_DEFINE() [1/2]

static K_SEM_DEFINE ( sema2  ,
,
 
)
static

◆ K_SEM_DEFINE() [2/2]

static K_SEM_DEFINE ( sema3  ,
,
 
)
static

◆ thread_tslice()

static void thread_tslice ( void *  p1,
void *  p2,
void *  p3 
)
static

Variable Documentation

◆ t

struct k_thread t[2]
static

◆ thread_idx

int thread_idx
static