Zephyr API Documentation
2.7.0-rc2
A Scalable Open Source RTOS
|
Macros | |
#define | HIGH_T1 0xaaa |
#define | HIGH_T2 0xbbb |
#define | LOW_PRO 0xccc |
#define | STACKSIZE (512 + CONFIG_TEST_EXTRA_STACKSIZE) |
Functions | |
static | K_THREAD_STACK_DEFINE (thread_low_stack,(512+CONFIG_TEST_EXTRA_STACKSIZE)) |
static | K_THREAD_STACK_DEFINE (thread_high_stack1,(512+CONFIG_TEST_EXTRA_STACKSIZE)) |
static | K_THREAD_STACK_DEFINE (thread_high_stack2,(512+CONFIG_TEST_EXTRA_STACKSIZE)) |
SYS_MUTEX_DEFINE (mutex) | |
static void | low_prio_wait_for_mutex (void *p1, void *p2, void *p3) |
static void | high_prio_t1_wait_for_mutex (void *p1, void *p2, void *p3) |
static void | high_prio_t2_wait_for_mutex (void *p1, void *p2, void *p3) |
void | test_mutex_multithread_competition (void) |
Test multi-threads to take mutex. More... | |
Variables | |
static struct k_thread | thread_low_data |
static struct k_thread | thread_high_data1 |
static struct k_thread | thread_high_data2 |
static uint32_t | flag [3] |
static uint32_t | index |
#define HIGH_T1 0xaaa |
#define HIGH_T2 0xbbb |
#define LOW_PRO 0xccc |
#define STACKSIZE (512 + CONFIG_TEST_EXTRA_STACKSIZE) |
|
static |
|
static |
|
static |
SYS_MUTEX_DEFINE | ( | mutex | ) |
Test multi-threads to take mutex.
Define three threads, and set a higher priority for two of them, and set a lower priority for the last one. Then Add a delay between creating the two high priority threads. Test point:
|
static |
|
static |
|
static |
|
static |
|
static |