Zephyr Project API 3.7.0-rc1
A Scalable Open Source RTOS
Loading...
Searching...
No Matches
test_kthread_for_each.c File Reference

Macros

#define SLEEP_MS   100
 
#define TEST_STRING   "TEST"
 
#define TEST_STRING_UNLOCKED   "TEST_UNLOCKED"
 

Functions

 K_THREAD_STACK_DEFINE (tstack1,(512+CONFIG_TEST_EXTRA_STACK_SIZE))
 
static void thread_entry (void *p1, void *p2, void *p3)
 
static void thread_callback (const struct k_thread *thread, void *user_data)
 
static void thread_callback_unlocked (const struct k_thread *thread, void *user_data)
 
 ZTEST (threads_lifecycle_1cpu, test_k_thread_foreach)
 Test k_thread_foreach API.
 
 ZTEST (threads_lifecycle_1cpu, test_k_thread_foreach_unlocked)
 Test k_thread_foreach_unlock API.
 
 ZTEST (threads_lifecycle_1cpu, test_k_thread_foreach_null_cb)
 Test k_thread_foreach API with null callback.
 
 ZTEST (threads_lifecycle_1cpu, test_k_thread_foreach_unlocked_null_cb)
 Test k_thread_foreach_unlocked API with null callback.
 
 ZTEST (threads_lifecycle_1cpu, test_k_thread_state_str)
 Test k_thread_state_str API with null callback.
 

Variables

static int tcount
 
static bool thread_flag
 
static bool create_thread
 
static k_tid_t in_callback_tid
 
struct k_thread tdata1
 

Macro Definition Documentation

◆ SLEEP_MS

#define SLEEP_MS   100

◆ TEST_STRING

#define TEST_STRING   "TEST"

◆ TEST_STRING_UNLOCKED

#define TEST_STRING_UNLOCKED   "TEST_UNLOCKED"

Function Documentation

◆ K_THREAD_STACK_DEFINE()

K_THREAD_STACK_DEFINE ( tstack1  ,
(512+CONFIG_TEST_EXTRA_STACK_SIZE)   
)

◆ thread_callback()

static void thread_callback ( const struct k_thread thread,
void *  user_data 
)
static

◆ thread_callback_unlocked()

static void thread_callback_unlocked ( const struct k_thread thread,
void *  user_data 
)
static

◆ thread_entry()

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

Variable Documentation

◆ create_thread

bool create_thread
static

◆ in_callback_tid

k_tid_t in_callback_tid
static

◆ tcount

int tcount
static

◆ tdata1

struct k_thread tdata1

◆ thread_flag

bool thread_flag
static