Zephyr Project API 3.7.0
A Scalable Open Source RTOS
|
#include <zephyr/tc_util.h>
#include <zephyr/ztest.h>
#include <zephyr/kernel.h>
#include <ksched.h>
#include <ipi.h>
#include <zephyr/kernel_structs.h>
Macros | |
#define | STACK_SIZE (1024 + CONFIG_TEST_EXTRA_STACK_SIZE) |
#define | NUM_THREADS (CONFIG_MP_MAX_NUM_CPUS - 1) |
#define | DELAY_FOR_IPIS 200 |
#define | PRIORITY_HIGH 5 |
#define | PRIORITY_MED_HIGH 6 |
#define | PRIORITY_MED_LOW 7 |
#define | PRIORITY_LOW 9 |
Functions | |
K_THREAD_STACK_DEFINE (stack2,(1024+CONFIG_TEST_EXTRA_STACK_SIZE)) | |
K_THREAD_STACK_DEFINE (stack3,(1024+CONFIG_TEST_EXTRA_STACK_SIZE)) | |
K_THREAD_STACK_DEFINE (stack4,(1024+CONFIG_TEST_EXTRA_STACK_SIZE)) | |
K_EVENT_DEFINE (my_event) | |
static void | show_executing_threads (const char *str) |
static void | timer_expiry_fn (struct k_timer *timer) |
Should the threads not be scheduled as expected, abort threads T2, T3 and T4 and allow the system to recover. | |
void | thread3_entry (void *p1, void *p2, void *p3) |
void | thread4_entry (void *p1, void *p2, void *p3) |
void | thread2_entry (void *p1, void *p2, void *p3) |
ZTEST (ipi_cascade, test_ipi_cascade) | |
ZTEST_SUITE (ipi_cascade, NULL, NULL, NULL, NULL, NULL) | |
Variables | |
static struct k_thread | thread2 |
static struct k_thread | thread3 |
static struct k_thread | thread4 |
static bool | thread1_ready |
static bool | thread2_ready |
static int | cpu_t1 |
static int | cpu_t2 |
static int | cpu_t3 |
static int | cpu_t4 |
static struct k_timer | my_timer |
static volatile bool | timer_expired |
#define DELAY_FOR_IPIS 200 |
#define NUM_THREADS (CONFIG_MP_MAX_NUM_CPUS - 1) |
#define PRIORITY_HIGH 5 |
#define PRIORITY_LOW 9 |
#define PRIORITY_MED_HIGH 6 |
#define PRIORITY_MED_LOW 7 |
#define STACK_SIZE (1024 + CONFIG_TEST_EXTRA_STACK_SIZE) |
K_EVENT_DEFINE | ( | my_event | ) |
K_THREAD_STACK_DEFINE | ( | stack2 | , |
(1024+CONFIG_TEST_EXTRA_STACK_SIZE) | |||
) |
K_THREAD_STACK_DEFINE | ( | stack3 | , |
(1024+CONFIG_TEST_EXTRA_STACK_SIZE) | |||
) |
K_THREAD_STACK_DEFINE | ( | stack4 | , |
(1024+CONFIG_TEST_EXTRA_STACK_SIZE) | |||
) |
|
static |
void thread2_entry | ( | void * | p1, |
void * | p2, | ||
void * | p3 | ||
) |
void thread3_entry | ( | void * | p1, |
void * | p2, | ||
void * | p3 | ||
) |
void thread4_entry | ( | void * | p1, |
void * | p2, | ||
void * | p3 | ||
) |
|
static |
Should the threads not be scheduled as expected, abort threads T2, T3 and T4 and allow the system to recover.
The main thread (T1/test_ipi_cascade) will verify that the timer did not execute.
ZTEST | ( | ipi_cascade | , |
test_ipi_cascade | |||
) |
ZTEST_SUITE | ( | ipi_cascade | , |
NULL | , | ||
NULL | , | ||
NULL | , | ||
NULL | , | ||
NULL | |||
) |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |