Zephyr Project API 3.7.0
A Scalable Open Source RTOS
|
Macros | |
#define | STACKSIZE 1024 |
#define | DEFINE_PARTICIPANT_THREAD(id) |
#define | PARTICIPANT_THREAD_OPTIONS (0) |
#define | CREATE_PARTICIPANT_THREAD(id, pri, entry) |
#define | START_PARTICIPANT_THREAD(id) k_thread_start(&(thread_##id##_thread_data)); |
#define | JOIN_PARTICIPANT_THREAD(id) k_thread_join(&(thread_##id##_thread_data), K_FOREVER); |
#define | WAIT_MS 10 /* Time to wait/sleep between actions */ |
#define | LOOP_CNT 4 /* Number of times low priority thread waits */ |
Functions | |
K_SEM_DEFINE (metairq_sem, 0, 1) | |
K_SEM_DEFINE (coop_sem1, 0, 1) | |
K_SEM_DEFINE (coop_sem2, 0, 1) | |
void | metairq_thread (void *p1, void *p2, void *p3) |
void | coop_thread1 (void *p1, void *p2, void *p3) |
void | coop_thread2 (void *p1, void *p2, void *p3) |
K_THREAD_STACK_DEFINE (thread_metairq_thread_id_stack_area, 1024) | |
K_THREAD_STACK_DEFINE (thread_coop_thread1_id_stack_area, 1024) | |
K_THREAD_STACK_DEFINE (thread_coop_thread2_id_stack_area, 1024) | |
void | create_participant_threads (void) |
void | start_participant_threads (void) |
void | join_participant_threads (void) |
ZTEST (suite_preempt_metairq, test_preempt_metairq) | |
ZTEST_SUITE (suite_preempt_metairq, NULL, NULL, NULL, NULL, NULL) | |
Variables | |
volatile int | coop_cnt1 |
volatile int | coop_cnt2 |
struct k_thread | thread_metairq_thread_id_thread_data |
k_tid_t | thread_metairq_thread_id_tid |
struct k_thread | thread_coop_thread1_id_thread_data |
k_tid_t | thread_coop_thread1_id_tid |
struct k_thread | thread_coop_thread2_id_thread_data |
k_tid_t | thread_coop_thread2_id_tid |
#define CREATE_PARTICIPANT_THREAD | ( | id, | |
pri, | |||
entry | |||
) |
#define DEFINE_PARTICIPANT_THREAD | ( | id | ) |
#define JOIN_PARTICIPANT_THREAD | ( | id | ) | k_thread_join(&(thread_##id##_thread_data), K_FOREVER); |
#define LOOP_CNT 4 /* Number of times low priority thread waits */ |
#define PARTICIPANT_THREAD_OPTIONS (0) |
#define STACKSIZE 1024 |
#define START_PARTICIPANT_THREAD | ( | id | ) | k_thread_start(&(thread_##id##_thread_data)); |
#define WAIT_MS 10 /* Time to wait/sleep between actions */ |
void coop_thread1 | ( | void * | p1, |
void * | p2, | ||
void * | p3 | ||
) |
void coop_thread2 | ( | void * | p1, |
void * | p2, | ||
void * | p3 | ||
) |
void create_participant_threads | ( | void | ) |
void join_participant_threads | ( | void | ) |
K_SEM_DEFINE | ( | coop_sem1 | , |
0 | , | ||
1 | |||
) |
K_SEM_DEFINE | ( | coop_sem2 | , |
0 | , | ||
1 | |||
) |
K_SEM_DEFINE | ( | metairq_sem | , |
0 | , | ||
1 | |||
) |
K_THREAD_STACK_DEFINE | ( | thread_coop_thread1_id_stack_area | , |
1024 | |||
) |
K_THREAD_STACK_DEFINE | ( | thread_coop_thread2_id_stack_area | , |
1024 | |||
) |
K_THREAD_STACK_DEFINE | ( | thread_metairq_thread_id_stack_area | , |
1024 | |||
) |
void metairq_thread | ( | void * | p1, |
void * | p2, | ||
void * | p3 | ||
) |
void start_participant_threads | ( | void | ) |
ZTEST | ( | suite_preempt_metairq | , |
test_preempt_metairq | |||
) |
ZTEST_SUITE | ( | suite_preempt_metairq | , |
NULL | , | ||
NULL | , | ||
NULL | , | ||
NULL | , | ||
NULL | |||
) |
volatile int coop_cnt1 |
volatile int coop_cnt2 |
struct k_thread thread_coop_thread1_id_thread_data |
k_tid_t thread_coop_thread1_id_tid |
struct k_thread thread_coop_thread2_id_thread_data |
k_tid_t thread_coop_thread2_id_tid |
struct k_thread thread_metairq_thread_id_thread_data |
k_tid_t thread_metairq_thread_id_tid |