Zephyr Project API
3.1.0
A Scalable Open Source RTOS
|
#include <ztest.h>
#include <zephyr/irq_offload.h>
#include <zephyr/sys/__assert.h>
#include <zephyr/sys/util.h>
Data Structures | |
struct | scratch_fifo_packet |
struct | reply_packet |
struct | timeout_order_data |
Macros | |
#define | NUM_SCRATCH_FIFO_PACKETS 20 |
#define | TIMEOUT_ORDER_NUM_THREADS ARRAY_SIZE(timeout_order_data_mult_fifo) |
#define | TSTACK_SIZE (512 + CONFIG_TEST_EXTRA_STACK_SIZE) |
#define | FIFO_THREAD_PRIO -5 |
Functions | |
static | K_THREAD_STACK_ARRAY_DEFINE (ttstack, ARRAY_SIZE(timeout_order_data_mult_fifo),(512+CONFIG_TEST_EXTRA_STACK_SIZE)) |
static void * | get_scratch_packet (void) |
static void | put_scratch_packet (void *packet) |
static bool | is_timeout_in_range (uint32_t start_time, uint32_t timeout) |
static void | test_thread_put_timeout (void *p1, void *p2, void *p3) |
static void | test_thread_pend_and_timeout (void *p1, void *p2, void *p3) |
static int | test_multiple_threads_pending (struct timeout_order_data *test_data, int test_data_size) |
static void | test_thread_pend_and_get_data (void *p1, void *p2, void *p3) |
static int | test_multiple_threads_get_data (struct timeout_order_data *test_data, int test_data_size) |
static void | test_thread_timeout_reply_values (void *p1, void *p2, void *p3) |
static void | test_thread_timeout_reply_values_wfe (void *p1, void *p2, void *p3) |
static void | test_timeout_empty_fifo (void) |
Test empty fifo with timeout and K_NO_WAIT. More... | |
static void | test_timeout_non_empty_fifo (void) |
Test non empty fifo with timeout and K_NO_WAIT. More... | |
static void | test_timeout_fifo_thread (void) |
Test fifo with timeout and K_NO_WAIT. More... | |
static void | test_timeout_threads_pend_on_fifo (void) |
Test fifo with different timeouts. More... | |
static void | test_timeout_threads_pend_on_dual_fifos (void) |
Test multiple fifos with different timeouts. More... | |
static void | test_timeout_threads_pend_fail_on_fifo (void) |
Test same fifo with different timeouts. More... | |
static void | test_timeout_setup (void) |
Test fifo init. More... | |
void | test_main (void) |
Variables | |
struct scratch_fifo_packet | scratch_fifo_packets [20] |
struct k_fifo | scratch_fifo_packets_fifo |
static struct k_fifo | fifo_timeout [2] |
struct k_fifo | timeout_order_fifo |
struct timeout_order_data | timeout_order_data [] |
struct timeout_order_data | timeout_order_data_mult_fifo [] |
static struct k_thread | ttdata [ARRAY_SIZE(timeout_order_data_mult_fifo)] |
static k_tid_t | tid [ARRAY_SIZE(timeout_order_data_mult_fifo)] |
#define FIFO_THREAD_PRIO -5 |
#define NUM_SCRATCH_FIFO_PACKETS 20 |
#define TIMEOUT_ORDER_NUM_THREADS ARRAY_SIZE(timeout_order_data_mult_fifo) |
#define TSTACK_SIZE (512 + CONFIG_TEST_EXTRA_STACK_SIZE) |
|
static |
|
static |
|
static |
void test_main | ( | void | ) |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
struct scratch_fifo_packet scratch_fifo_packets[20] |
struct k_fifo scratch_fifo_packets_fifo |
|
static |
struct timeout_order_data timeout_order_data[] |
struct timeout_order_data timeout_order_data_mult_fifo[] |
struct k_fifo timeout_order_fifo |
|
static |