|
Zephyr Project API 3.7.0
A Scalable Open Source RTOS
|
#include <zephyr/tc_util.h>#include <zephyr/ztest.h>#include <zephyr/kernel.h>#include <zephyr/spinlock.h>Macros | |
| #define | CPU1_STACK_SIZE 1024 |
Functions | |
| K_THREAD_STACK_DEFINE (cpu1_stack, 1024) | |
| ZTEST (spinlock, test_spinlock_basic) | |
| Test basic spinlock. | |
| static void | bounce_once (int id, bool trylock) |
| static void | cpu1_fn (void *p1, void *p2, void *p3) |
| ZTEST (spinlock, test_spinlock_bounce) | |
| Test spinlock with bounce. | |
| ZTEST (spinlock, test_spinlock_mutual_exclusion) | |
| Test basic mutual exclusion using interrupt masking. | |
| static void | trylock_fn (void *p1, void *p2, void *p3) |
| ZTEST (spinlock, test_trylock) | |
| Test k_spin_trylock() | |
| static void | before (void *ctx) |
| ZTEST_SUITE (spinlock, NULL, NULL, before, NULL, NULL) | |
Variables | |
| struct k_thread | cpu1_thread |
| static struct k_spinlock | bounce_lock |
| volatile int | bounce_owner |
| volatile int | bounce_done |
| volatile int | trylock_failures |
| volatile int | trylock_successes |
| #define CPU1_STACK_SIZE 1024 |
|
static |
|
static |
|
static |
| K_THREAD_STACK_DEFINE | ( | cpu1_stack | , |
| 1024 | |||
| ) |
|
static |
| ZTEST_SUITE | ( | spinlock | , |
| NULL | , | ||
| NULL | , | ||
| before | , | ||
| NULL | , | ||
| NULL | |||
| ) |
| volatile int bounce_done |
|
static |
| volatile int bounce_owner |
| struct k_thread cpu1_thread |
| volatile int trylock_failures |
| volatile int trylock_successes |