|
Zephyr API Documentation 4.1.99
A Scalable Open Source RTOS
|
#include <zephyr/ztest.h>Macros | |
| #define | TIMEOUT 500 |
| #define | STACK_SIZE (512 + CONFIG_TEST_EXTRA_STACK_SIZE) |
| #define | THREAD_HIGH_PRIORITY 1 |
| #define | THREAD_MID_PRIORITY 3 |
| #define | THREAD_LOW_PRIORITY 5 |
Functions | |
| K_MUTEX_DEFINE (kmutex) | |
| TESTPOINT: init via K_MUTEX_DEFINE. | |
| static | K_THREAD_STACK_DEFINE (tstack,(512+CONFIG_TEST_EXTRA_STACK_SIZE)) |
| static | K_THREAD_STACK_DEFINE (tstack2,(512+CONFIG_TEST_EXTRA_STACK_SIZE)) |
| static | K_THREAD_STACK_DEFINE (tstack3,(512+CONFIG_TEST_EXTRA_STACK_SIZE)) |
| static void | tThread_entry_lock_forever (void *p1, void *p2, void *p3) |
| static void | tThread_entry_lock_no_wait (void *p1, void *p2, void *p3) |
| static void | tThread_entry_lock_timeout_fail (void *p1, void *p2, void *p3) |
| static void | tThread_entry_lock_timeout_pass (void *p1, void *p2, void *p3) |
| static void | tmutex_test_lock (struct k_mutex *pmutex, void(*entry_fn)(void *, void *, void *)) |
| static void | tmutex_test_lock_timeout (struct k_mutex *pmutex, void(*entry_fn)(void *, void *, void *)) |
| static void | tmutex_test_lock_unlock (struct k_mutex *pmutex) |
| static void | tThread_T1_priority_inheritance (void *p1, void *p2, void *p3) |
| static void | tThread_T2_priority_inheritance (void *p1, void *p2, void *p3) |
| static void | tThread_lock_with_time_period (void *p1, void *p2, void *p3) |
| static void | tThread_waiter (void *p1, void *p2, void *p3) |
| void | test_mutex_reent_lock_forever (void) |
| void | test_mutex_reent_lock_no_wait (void) |
| void | test_mutex_reent_lock_timeout_fail (void) |
| void | test_mutex_reent_lock_timeout_pass (void) |
| void | test_mutex_lock_unlock (void) |
| void | test_mutex_recursive (void) |
| Test recursive mutex. | |
| void | test_mutex_priority_inheritance (void) |
| Test mutex's priority inheritance mechanism. | |
| static void | tThread_mutex_lock_should_fail (void *p1, void *p2, void *p3) |
| void | test_mutex_timeout_race_during_priority_inversion (void) |
| Test fix for subtle race during priority inversion. | |
| static void * | mutex_api_tests_setup (void) |
| ZTEST_SUITE (mutex_api, NULL, mutex_api_tests_setup, NULL, NULL, NULL) | |
| ZTEST_SUITE (mutex_api_1cpu, NULL, mutex_api_tests_setup, ztest_simple_1cpu_before, ztest_simple_1cpu_after, NULL) | |
Variables | |
| static ZTEST_DMEM int | case_type |
| static ZTEST_DMEM int | thread_ret = TC_FAIL |
| static struct k_mutex | tmutex |
| static struct k_thread | tdata |
| static struct k_thread | tdata2 |
| static struct k_thread | tdata3 |
| #define STACK_SIZE (512 + CONFIG_TEST_EXTRA_STACK_SIZE) |
| #define THREAD_HIGH_PRIORITY 1 |
| #define THREAD_LOW_PRIORITY 5 |
| #define THREAD_MID_PRIORITY 3 |
| #define TIMEOUT 500 |
| K_MUTEX_DEFINE | ( | kmutex | ) |
TESTPOINT: init via K_MUTEX_DEFINE.
|
static |
|
static |
|
static |
|
static |
| void test_mutex_lock_unlock | ( | void | ) |
TESTPOINT: test k_mutex_init mutex
TESTPOINT: test K_MUTEX_DEFINE mutex
| void test_mutex_reent_lock_forever | ( | void | ) |
TESTPOINT: test k_mutex_init mutex
TESTPOINT: test K_MUTEX_DEFINE mutex
| void test_mutex_reent_lock_no_wait | ( | void | ) |
TESTPOINT: test k_mutex_init mutex
TESTPOINT: test K_MUTEX_DEFINE mutex
| void test_mutex_reent_lock_timeout_fail | ( | void | ) |
TESTPOINT: test k_mutex_init mutex
TESTPOINT: test K_MUTEX_DEFINE mutex
| void test_mutex_reent_lock_timeout_pass | ( | void | ) |
TESTPOINT: test k_mutex_init mutex
TESTPOINT: test K_MUTEX_DEFINE mutex
|
static |
|
static |
TESTPOINT: test k_mutex_init mutex
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
| ZTEST_SUITE | ( | mutex_api | , |
| NULL | , | ||
| mutex_api_tests_setup | , | ||
| NULL | , | ||
| NULL | , | ||
| NULL | ) |
| ZTEST_SUITE | ( | mutex_api_1cpu | , |
| NULL | , | ||
| mutex_api_tests_setup | , | ||
| ztest_simple_1cpu_before | , | ||
| ztest_simple_1cpu_after | , | ||
| NULL | ) |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |