|
| | K_SEM_DEFINE (statically_defined_sem,(0U),(10U)) |
| |
| | K_SEM_DEFINE (simple_sem,(0U),(10U)) |
| |
| | K_SEM_DEFINE (low_prio_sem,(0U),(10U)) |
| |
| | K_SEM_DEFINE (mid_prio_sem,(0U),(10U)) |
| |
| | K_SEM_DEFINE (high_prio_long_sem,(0U),(10U)) |
| |
| | K_SEM_DEFINE (high_prio_sem,(0U),(10U)) |
| |
| | K_SEM_DEFINE (multiple_thread_sem,(0U),(10U)) |
| |
| | K_THREAD_STACK_DEFINE (stack_1,(512+CONFIG_TEST_EXTRA_STACK_SIZE)) |
| |
| | K_THREAD_STACK_DEFINE (stack_2,(512+CONFIG_TEST_EXTRA_STACK_SIZE)) |
| |
| | K_THREAD_STACK_DEFINE (stack_3,(512+CONFIG_TEST_EXTRA_STACK_SIZE)) |
| |
| | K_THREAD_STACK_DEFINE (stack_4,(512+CONFIG_TEST_EXTRA_STACK_SIZE)) |
| |
| | K_THREAD_STACK_ARRAY_DEFINE (multiple_stack,(5),(512+CONFIG_TEST_EXTRA_STACK_SIZE)) |
| |
| | K_PIPE_DEFINE (timeout_info_pipe, sizeof(struct timeout_info) *(5), 4) |
| |
| | K_SEM_DEFINE (ksema,(0U),(10U)) |
| |
| static | K_THREAD_STACK_DEFINE (tstack,(512+CONFIG_TEST_EXTRA_STACK_SIZE)) |
| |
| void | sem_give_task (void *p1, void *p2, void *p3) |
| |
| void | sem_reset_take_task (void *p1, void *p2, void *p3) |
| |
| void | isr_sem_give (const void *semaphore) |
| |
| static void | tsema_thread_thread (struct k_sem *psem) |
| |
| static void | tsema_thread_isr (struct k_sem *psem) |
| |
| void | isr_sem_take (const void *semaphore) |
| |
| void | sem_take_timeout_forever_helper (void *p1, void *p2, void *p3) |
| |
| void | sem_take_timeout_isr_helper (void *p1, void *p2, void *p3) |
| |
| void | sem_take_multiple_low_prio_helper (void *p1, void *p2, void *p3) |
| |
| void | sem_take_multiple_mid_prio_helper (void *p1, void *p2, void *p3) |
| |
| void | sem_take_multiple_high_prio_helper (void *p1, void *p2, void *p3) |
| |
| void | sem_queue_mutual_exclusion1 (void *p1, void *p2, void *p3) |
| |
| void | sem_queue_mutual_exclusion2 (void *p1, void *p2, void *p3) |
| |
| void | sem_take_multiple_high_prio_long_helper (void *p1, void *p2, void *p3) |
| |
| void | sem_multiple_threads_wait_helper (void *p1, void *p2, void *p3) |
| |
| void | test_sem_multiple_threads_wait (void) |
| | Test multiple semaphore take and give with wait.
|
| |
| void | test_sem_measure_timeouts (void) |
| | Test semaphore timeout period.
|
| |
| void | sem_measure_timeout_from_thread_helper (void *p1, void *p2, void *p3) |
| |
| void | test_sem_measure_timeout_from_thread (void) |
| | Test timeout of semaphore from thread.
|
| |
| void | sem_multiple_take_and_timeouts_helper (void *p1, void *p2, void *p3) |
| |
| void | test_sem_multiple_take_and_timeouts (void) |
| | Test multiple semaphore take with timeouts.
|
| |
| void | sem_multi_take_timeout_diff_sem_helper (void *p1, void *p2, void *p3) |
| |
| void | test_sem_multi_take_timeout_diff_sem (void) |
| | Test sequence of multiple semaphore timeouts.
|
| |
| void | test_sem_queue_mutual_exclusion (void) |
| | Test thread mutual exclusion by semaphore.
|
| |
| static void | thread_sem_give_null (void *p1, void *p2, void *p3) |
| |
| void | test_sem_give_null (void) |
| | Test k_sem_give() API.
|
| |
| static void | thread_sem_init_null (void *p1, void *p2, void *p3) |
| |
| void | test_sem_init_null (void) |
| | Test k_sem_init() API.
|
| |
| static void | thread_sem_take_null (void *p1, void *p2, void *p3) |
| |
| void | test_sem_take_null (void) |
| | Test k_sem_take() API.
|
| |
| static void | thread_sem_reset_null (void *p1, void *p2, void *p3) |
| |
| void | test_sem_reset_null (void) |
| | Test k_sem_reset() API.
|
| |
| static void | thread_sem_count_get_null (void *p1, void *p2, void *p3) |
| |
| void | test_sem_count_get_null (void) |
| | Test k_sem_count_get() API.
|
| |
| void * | test_init (void) |
| |
| | ZTEST_SUITE (semaphore, NULL, test_init, NULL, NULL, NULL) |
| |
| | ZTEST_SUITE (semaphore_1cpu, NULL, NULL, ztest_simple_1cpu_before, ztest_simple_1cpu_after, NULL) |
| |
| | ZTEST_SUITE (semaphore_null_case, NULL, test_init, NULL, NULL, NULL) |
| |
|
| void | test_k_sem_define (void) |
| | Test semaphore defined at compile time.
|
| |
| void | test_sem_thread2thread (void) |
| | Test synchronization of threads with semaphore.
|
| |
| void | test_sem_thread2isr (void) |
| | Test synchronization between thread and irq.
|
| |
| void | test_k_sem_init (void) |
| | Test semaphore initialization at runtime.
|
| |
| void | test_sem_reset (void) |
| | Test k_sem_reset() API.
|
| |
| void | test_sem_reset_waiting (void) |
| |
| void | test_sem_count_get (void) |
| | Test k_sem_count_get() API.
|
| |
| void | test_sem_give_from_isr (void) |
| | Test whether a semaphore can be given by an ISR.
|
| |
| void | test_sem_give_from_thread (void) |
| | Test semaphore count when given by thread.
|
| |
| void | test_sem_take_no_wait (void) |
| | Test if k_sem_take() decreases semaphore count.
|
| |
| void | test_sem_take_no_wait_fails (void) |
| | Test k_sem_take() when there is no semaphore to take.
|
| |
| void | test_sem_take_timeout_fails (void) |
| | Test a semaphore take operation with an unavailable semaphore.
|
| |
| void | test_sem_take_timeout (void) |
| | Test the semaphore take operation with specified timeout.
|
| |
| void | test_sem_take_timeout_forever (void) |
| | Test the semaphore take operation with forever wait.
|
| |
| void | test_sem_take_timeout_isr (void) |
| | Test k_sem_take() with timeout in ISR context.
|
| |
| void | test_sem_take_multiple (void) |
| | Test semaphore take operation by multiple threads.
|
| |
| void | test_k_sem_correct_count_limit (void) |
| | Test the max value a semaphore can be given and taken.
|
| |
| void | test_sem_give_take_from_isr (void) |
| | Test semaphore give and take and its count from ISR.
|
| |