Zephyr Project API 3.7.0
A Scalable Open Source RTOS
|
#include "zephyr/ztest_test.h"
#include <zephyr/kernel.h>
#include <zephyr/ztest.h>
#include <zephyr/spinlock.h>
Macros | |
#define | STACK_SIZE (8 * 1024) |
#define | CORES_NUM CONFIG_MP_MAX_NUM_CPUS |
#define | FAIRNESS_TEST_CYCLES_PER_CORE 1000 |
Functions | |
static | K_THREAD_STACK_ARRAY_DEFINE (tstack, CONFIG_MP_MAX_NUM_CPUS,(8 *1024)) |
static struct k_thread * | get_thread (uint8_t core_id) |
static void | test_thread (void *arg1, void *arg2, void *arg3) |
Execution thread which runs concurrently on each CPU in the system. | |
static void | test_init (void) |
ZTEST (spinlock, test_spinlock_fairness) | |
Test spinlock acquisition fairness. | |
Variables | |
static struct k_thread | tthread [CONFIG_MP_MAX_NUM_CPUS] |
static uint32_t | spinlock_grabbed [CONFIG_MP_MAX_NUM_CPUS] |
static atomic_t | fairness_test_cycles |
static struct k_spinlock | lock |
static atomic_t | start_sync |
#define CORES_NUM CONFIG_MP_MAX_NUM_CPUS |
#define FAIRNESS_TEST_CYCLES_PER_CORE 1000 |
#define STACK_SIZE (8 * 1024) |
|
static |
|
static |
|
static |
Execution thread which runs concurrently on each CPU in the system.
[in] | arg1 | - thread argument 1 |
[in] | arg2 | - thread argument 2 |
[in] | arg3 | - thread argument 3 |
|
static |
|
static |
|
static |
|
static |
|
static |