Zephyr API Documentation  2.7.0-rc2
A Scalable Open Source RTOS
user_api.c File Reference
#include "test_sched.h"
#include <ztest.h>
#include <irq_offload.h>
#include <kernel_internal.h>
#include <ztest_error_hook.h>

Macros

#define THREAD_TEST_PRIORITY   0
 

Functions

 K_SEM_DEFINE (user_sem, 0, 1)
 
 K_THREAD_STACK_DEFINE (ustack,(640+CONFIG_TEST_EXTRA_STACKSIZE))
 
static void sleepy_thread (void *p1, void *p2, void *p3)
 
void test_user_k_wakeup (void)
 
static void preempt_test_thread (void *p1, void *p2, void *p3)
 
void test_user_k_is_preempt (void)
 
static void thread_suspend_init_null (void *p1, void *p2, void *p3)
 
void test_k_thread_suspend_init_null (void)
 Test k_thread_suspend() API. More...
 
static void thread_resume_init_null (void *p1, void *p2, void *p3)
 
void test_k_thread_resume_init_null (void)
 Test k_thread_resume() API. More...
 
static void thread_priority_get_init_null (void *p1, void *p2, void *p3)
 
void test_k_thread_priority_get_init_null (void)
 Test k_thread_priority_get() API. More...
 
static void thread_priority_set_init_null (void *p1, void *p2, void *p3)
 
void test_k_thread_priority_set_init_null (void)
 Test k_thread_priority_set() API. More...
 
static void thread_priority_set_overmax (void *p1, void *p2, void *p3)
 
void test_k_thread_priority_set_overmax (void)
 Test k_thread_priority_set() API. More...
 
static void thread_priority_set_upgrade (void *p1, void *p2, void *p3)
 
void test_k_thread_priority_set_upgrade (void)
 Test k_thread_priority_set() API. More...
 
static void thread_wakeup_init_null (void *p1, void *p2, void *p3)
 
void test_k_wakeup_init_null (void)
 Test k_wakeup() API. More...
 

Variables

struct k_thread user_thread
 
ZTEST_BMEM volatile int thread_was_preempt
 

Macro Definition Documentation

◆ THREAD_TEST_PRIORITY

#define THREAD_TEST_PRIORITY   0

Function Documentation

◆ K_SEM_DEFINE()

K_SEM_DEFINE ( user_sem  ,
,
 
)

◆ K_THREAD_STACK_DEFINE()

K_THREAD_STACK_DEFINE ( ustack  ,
(640+CONFIG_TEST_EXTRA_STACKSIZE)   
)

◆ preempt_test_thread()

static void preempt_test_thread ( void p1,
void p2,
void p3 
)
static

◆ sleepy_thread()

static void sleepy_thread ( void p1,
void p2,
void p3 
)
static

◆ test_user_k_is_preempt()

void test_user_k_is_preempt ( void  )

◆ test_user_k_wakeup()

void test_user_k_wakeup ( void  )

◆ thread_priority_get_init_null()

static void thread_priority_get_init_null ( void p1,
void p2,
void p3 
)
static

◆ thread_priority_set_init_null()

static void thread_priority_set_init_null ( void p1,
void p2,
void p3 
)
static

◆ thread_priority_set_overmax()

static void thread_priority_set_overmax ( void p1,
void p2,
void p3 
)
static

◆ thread_priority_set_upgrade()

static void thread_priority_set_upgrade ( void p1,
void p2,
void p3 
)
static

◆ thread_resume_init_null()

static void thread_resume_init_null ( void p1,
void p2,
void p3 
)
static

◆ thread_suspend_init_null()

static void thread_suspend_init_null ( void p1,
void p2,
void p3 
)
static

userspace negative test: take NULL as input param to verify the api will trigger a fatal exception

◆ thread_wakeup_init_null()

static void thread_wakeup_init_null ( void p1,
void p2,
void p3 
)
static

Variable Documentation

◆ thread_was_preempt

ZTEST_BMEM volatile int thread_was_preempt

◆ user_thread

struct k_thread user_thread