|
Zephyr Project API 3.7.0
A Scalable Open Source RTOS
|
This test case verifies the correctness of irq_offload(), an important routine used in many other test cases for running a function in interrupt context, on the IRQ stack. More...
#include <zephyr/kernel.h>#include <zephyr/ztest.h>#include <zephyr/kernel_structs.h>#include <zephyr/irq_offload.h>Macros | |
| #define | SENTINEL_VALUE 0xDEADBEEF |
Functions | |
| K_THREAD_STACK_DEFINE (offload_stack, 384+CONFIG_TEST_EXTRA_STACK_SIZE) | |
| static void | offload_function (const void *param) |
| ZTEST (irq_offload, test_irq_offload) | |
| Verify thread context. | |
| void | nestoff_offload (const void *parameter) |
| static void | nestoff_timer_fn (struct k_timer *timer) |
| static void | offload_thread_fn (void *p0, void *p1, void *p2) |
| ZTEST (common_1cpu, test_nested_irq_offload) | |
| void * | common_setup (void) |
| ZTEST_SUITE (irq_offload, NULL, common_setup, NULL, NULL, NULL) | |
Variables | |
| volatile uint32_t | sentinel |
| struct k_thread | offload_thread |
| static struct k_timer | nestoff_timer |
| static bool | timer_executed |
| static bool | nested_executed |
This test case verifies the correctness of irq_offload(), an important routine used in many other test cases for running a function in interrupt context, on the IRQ stack.
| #define SENTINEL_VALUE 0xDEADBEEF |
| K_THREAD_STACK_DEFINE | ( | offload_stack | , |
| 384+ | CONFIG_TEST_EXTRA_STACK_SIZE | ||
| ) |
| void nestoff_offload | ( | const void * | parameter | ) |
|
static |
|
static |
|
static |
| ZTEST | ( | common_1cpu | , |
| test_nested_irq_offload | |||
| ) |
| ZTEST | ( | irq_offload | , |
| test_irq_offload | |||
| ) |
Verify thread context.
Check whether offloaded running function is in interrupt context, on the IRQ stack or not.
TESTPOINT: Offload to IRQ context
| ZTEST_SUITE | ( | irq_offload | , |
| NULL | , | ||
| common_setup | , | ||
| NULL | , | ||
| NULL | , | ||
| NULL | |||
| ) |
|
static |
|
static |
| struct k_thread offload_thread |
| volatile uint32_t sentinel |
|
static |