Zephyr Project API 3.7.0
A Scalable Open Source RTOS
|
#include <zephyr/tc_util.h>
#include <zephyr/ztest.h>
#include <zephyr/arch/cpu.h>
#include <zephyr/sys/util.h>
#include <zephyr/irq_offload.h>
#include <stdbool.h>
Macros | |
#define | THREAD_STACK (384 + CONFIG_TEST_EXTRA_STACK_SIZE) |
#define | TEST_THREAD_PRIORITY -4 |
#define | HELPER_THREAD_PRIORITY -10 |
#define | ONE_SECOND (MSEC_PER_SEC) |
#define | ONE_SECOND_ALIGNED (uint32_t)(k_ticks_to_ms_floor64(k_ms_to_ticks_ceil32(ONE_SECOND) + _TICK_ALIGN)) |
#define | TICK_MARGIN 1 |
Functions | |
static | K_THREAD_STACK_DEFINE (test_thread_stack,(384+CONFIG_TEST_EXTRA_STACK_SIZE)) |
static | K_THREAD_STACK_DEFINE (helper_thread_stack,(384+CONFIG_TEST_EXTRA_STACK_SIZE)) |
static void | test_objects_init (void) |
static void | align_to_tick_boundary (void) |
static int | sleep_time_valid (uint32_t start, uint32_t end, uint32_t dur) |
static void | test_thread (void *p1, void *p2, void *p3) |
static void | irq_offload_isr (const void *arg) |
static void | helper_thread (void *p1, void *p2, void *p3) |
ZTEST (sleep, test_sleep) | |
Test sleep functionality. | |
static void | forever_thread_entry (void *p1, void *p2, void *p3) |
ZTEST (sleep, test_sleep_forever) | |
static void * | sleep_setup (void) |
ZTEST_SUITE (sleep, NULL, sleep_setup, ztest_simple_1cpu_before, ztest_simple_1cpu_after, NULL) | |
Variables | |
static struct k_sem | test_thread_sem |
static struct k_sem | helper_thread_sem |
static struct k_sem | task_sem |
static k_tid_t | test_thread_id |
static k_tid_t | helper_thread_id |
static struct k_thread | test_thread_data |
static struct k_thread | helper_thread_data |
static bool | test_failure = true |
#define HELPER_THREAD_PRIORITY -10 |
#define ONE_SECOND (MSEC_PER_SEC) |
#define ONE_SECOND_ALIGNED (uint32_t)(k_ticks_to_ms_floor64(k_ms_to_ticks_ceil32(ONE_SECOND) + _TICK_ALIGN)) |
#define TEST_THREAD_PRIORITY -4 |
#define THREAD_STACK (384 + CONFIG_TEST_EXTRA_STACK_SIZE) |
#define TICK_MARGIN 1 |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
ZTEST | ( | sleep | , |
test_sleep_forever | |||
) |
ZTEST_SUITE | ( | sleep | , |
NULL | , | ||
sleep_setup | , | ||
ztest_simple_1cpu_before | , | ||
ztest_simple_1cpu_after | , | ||
NULL | |||
) |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |