Zephyr API Documentation  2.7.0-rc2
A Scalable Open Source RTOS
test_kthread_for_each.c File Reference
#include <ztest.h>
#include <irq_offload.h>
#include <debug/stack.h>
#include "tests_thread_apis.h"

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_STACKSIZE))
 
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)
 
void test_k_thread_foreach (void)
 Test k_thread_foreach API. More...
 
void test_k_thread_foreach_unlocked (void)
 Test k_thread_foreach_unlock API. More...
 
void test_k_thread_foreach_null_cb (void)
 Test k_thread_foreach API with null callback. More...
 
void test_k_thread_foreach_unlocked_null_cb (void)
 Test k_thread_foreach_unlocked API with null callback. More...
 
void test_k_thread_state_str (void)
 Test k_thread_state_str API with null callback. More...
 

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_STACKSIZE)   
)

◆ 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