Zephyr Project API 3.7.0
A Scalable Open Source RTOS
|
Data Structures | |
struct | scratch_lifo_packet |
struct | reply_packet |
struct | timeout_order_data |
Macros | |
#define | STACK_SIZE (1024 + CONFIG_TEST_EXTRA_STACK_SIZE) |
#define | LIST_LEN 2 |
#define | NUM_SCRATCH_LIFO_PACKETS 20 |
#define | TIMEOUT_ORDER_NUM_THREADS ARRAY_SIZE(timeout_order_data_mult_lifo) |
#define | TSTACK_SIZE (1024 + CONFIG_TEST_EXTRA_STACK_SIZE) |
#define | LIFO_THREAD_PRIO -5 |
Functions | |
static | K_THREAD_STACK_DEFINE (tstack,(1024+CONFIG_TEST_EXTRA_STACK_SIZE)) |
static | K_THREAD_STACK_DEFINE (tstack1,(1024+CONFIG_TEST_EXTRA_STACK_SIZE)) |
void | test_thread_pend_and_timeout (void *p1, void *p2, void *p3) |
a thread pends on a lifo then times out | |
static | K_THREAD_STACK_ARRAY_DEFINE (ttstack, ARRAY_SIZE(timeout_order_data_mult_lifo),(1024+CONFIG_TEST_EXTRA_STACK_SIZE)) |
static void * | get_scratch_packet (void) |
static void | put_scratch_packet (void *packet) |
static void | thread_entry_nowait (void *p1, void *p2, void *p3) |
static bool | is_timeout_in_range (uint32_t start_time, uint32_t timeout) |
static int | test_multiple_threads_pending (struct timeout_order_data *test_data, int test_data_size) |
static void | thread_entry_wait (void *p1, void *p2, void *p3) |
static void | test_thread_timeout_reply_values (void *p1, void *p2, void *p3) |
try getting data on lifo with special timeout value, return result in lifo | |
static void | test_thread_timeout_reply_values_wfe (void *p1, void *p2, void *p3) |
static void | test_thread_put_timeout (void *p1, void *p2, void *p3) |
A thread sleeps then puts data on the lifo. | |
ZTEST (lifo_usage, test_lifo_nowait) | |
Test last in, first out queue using LIFO. | |
ZTEST (lifo_usage_1cpu, test_lifo_wait) | |
Test pending reader in LIFO. | |
ZTEST (lifo_usage_1cpu, test_timeout_empty_lifo) | |
Test reading empty LIFO. | |
ZTEST (lifo_usage, test_timeout_non_empty_lifo) | |
Test read and write operation in LIFO with timeout. | |
ZTEST (lifo_usage_1cpu, test_timeout_lifo_thread) | |
Test LIFO with timeout. | |
ZTEST (lifo_usage_1cpu, test_timeout_threads_pend_on_lifo) | |
Test multiple pending readers in LIFO. | |
static void | test_para_init (void) |
Test LIFO initialization with various parameters. | |
void * | lifo_usage_setup (void) |
test case main entry | |
ZTEST_SUITE (lifo_usage_1cpu, NULL, lifo_usage_setup, ztest_simple_1cpu_before, ztest_simple_1cpu_after, NULL) | |
ZTEST_SUITE (lifo_usage, NULL, lifo_usage_setup, NULL, NULL, NULL) | |
Variables | |
struct k_lifo lifo | plifo |
static ldata_t | lifo_data [2] |
struct k_lifo | timeout_order_lifo |
static struct k_thread tdata | tdata1 |
static struct k_sem start_sema | wait_sema |
static struct k_lifo | lifo_timeout [2] |
struct timeout_order_data | timeout_order_data [] |
struct timeout_order_data | timeout_order_data_mult_lifo [] |
struct scratch_lifo_packet | scratch_lifo_packets [20] |
struct k_lifo | scratch_lifo_packets_lifo |
static k_tid_t | to_ord_tid [ARRAY_SIZE(timeout_order_data_mult_lifo)] |
static struct k_thread | ttdata [ARRAY_SIZE(timeout_order_data_mult_lifo)] |
#define LIFO_THREAD_PRIO -5 |
#define LIST_LEN 2 |
#define NUM_SCRATCH_LIFO_PACKETS 20 |
#define STACK_SIZE (1024 + CONFIG_TEST_EXTRA_STACK_SIZE) |
#define TIMEOUT_ORDER_NUM_THREADS ARRAY_SIZE(timeout_order_data_mult_lifo) |
#define TSTACK_SIZE (1024 + CONFIG_TEST_EXTRA_STACK_SIZE) |
|
static |
|
static |
|
static |
|
static |
void * lifo_usage_setup | ( | void | ) |
test case main entry
|
static |
|
static |
|
static |
|
static |
ZTEST_SUITE | ( | lifo_usage | , |
NULL | , | ||
lifo_usage_setup | , | ||
NULL | , | ||
NULL | , | ||
NULL | |||
) |
ZTEST_SUITE | ( | lifo_usage_1cpu | , |
NULL | , | ||
lifo_usage_setup | , | ||
ztest_simple_1cpu_before | , | ||
ztest_simple_1cpu_after | , | ||
NULL | |||
) |
|
static |
struct scratch_lifo_packet scratch_lifo_packets[20] |
struct k_lifo scratch_lifo_packets_lifo |
struct timeout_order_data timeout_order_data[] |
struct timeout_order_data timeout_order_data_mult_lifo[] |
struct k_lifo timeout_order_lifo |
|
static |
|
static |
|
static |