Zephyr API Documentation
2.7.0-rc2
A Scalable Open Source RTOS
|
Macros | |
#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) |
void | coop_thread1 (void) |
void | coop_thread2 (void) |
K_THREAD_DEFINE (metairq_thread_id, 1024, metairq_thread, 0, 0, 0, K_PRIO_COOP(0), 0, 0) | |
K_THREAD_DEFINE (coop_thread1_id, 1024, coop_thread1, 0, 0, 0, K_PRIO_COOP(1), 0, 0) | |
K_THREAD_DEFINE (coop_thread2_id, 1024, coop_thread2, 0, 0, 0, K_PRIO_COOP(2), 0, 0) | |
void | test_preempt (void) |
void | test_main (void) |
Variables | |
volatile int | coop_cnt1 |
volatile int | coop_cnt2 |
#define LOOP_CNT 4 /* Number of times low priority thread waits */ |
#define WAIT_MS 10 /* Time to wait/sleep between actions */ |
K_SEM_DEFINE | ( | coop_sem1 | , |
0 | , | ||
1 | |||
) |
K_SEM_DEFINE | ( | coop_sem2 | , |
0 | , | ||
1 | |||
) |
K_SEM_DEFINE | ( | metairq_sem | , |
0 | , | ||
1 | |||
) |
K_THREAD_DEFINE | ( | coop_thread1_id | , |
1024 | , | ||
coop_thread1 | , | ||
0 | , | ||
0 | , | ||
0 | , | ||
K_PRIO_COOP(1) | , | ||
0 | , | ||
0 | |||
) |
K_THREAD_DEFINE | ( | coop_thread2_id | , |
1024 | , | ||
coop_thread2 | , | ||
0 | , | ||
0 | , | ||
0 | , | ||
K_PRIO_COOP(2) | , | ||
0 | , | ||
0 | |||
) |
K_THREAD_DEFINE | ( | metairq_thread_id | , |
1024 | , | ||
metairq_thread | , | ||
0 | , | ||
0 | , | ||
0 | , | ||
K_PRIO_COOP(0) | , | ||
0 | , | ||
0 | |||
) |
volatile int coop_cnt1 |
volatile int coop_cnt2 |