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

Functions

static void tIsr (const void *data)
 
static void tpreempt_ctx (void *p1, void *p2, void *p3)
 
static void tcoop_ctx (void *p1, void *p2, void *p3)
 
 ZTEST (threads_scheduling, test_sched_is_preempt_thread)
 Validate the correctness of k_is_preempt_thread()
 

Variables

static struct k_thread tdata
 
static struct k_sem end_sema
 

Function Documentation

◆ tcoop_ctx()

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

TESTPOINT: The thread's priority is in the cooperative range.

TESTPOINT: The thread's priority is in the preemptible range.

TESTPOINT: The thread has locked the scheduler.

TESTPOINT: The thread has not locked the scheduler.

◆ tIsr()

static void tIsr ( const void *  data)
static

TESTPOINT: The code is running at ISR.

◆ tpreempt_ctx()

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

TESTPOINT: The thread's priority is in the preemptible range.

TESTPOINT: The thread has locked the scheduler.

TESTPOINT: The thread has not locked the scheduler.

TESTPOINT: The thread's priority is in the cooperative range.

Variable Documentation

◆ end_sema

struct k_sem end_sema
static

◆ tdata

struct k_thread tdata
static