![]() |
SuperTinyKernel™ RTOS 1.05.3
Lightweight, high-performance, deterministic, bare-metal C++ RTOS for resource-constrained embedded systems. MIT Open Source License.
|
Namespace of SpinLock test. More...
Classes | |
| class | MutualExclusionTask |
| Tests that Lock()/Unlock() provides mutual exclusion under concurrent access. More... | |
| class | TryLockFreeTask |
| Tests TryLock() succeeds immediately when the lock is free. More... | |
| class | TryLockContendedTask |
| Tests TryLock() returns false immediately when the lock is held by another task. More... | |
| class | RecursiveLockTask |
| Tests recursive Lock()/Unlock() by the same task. More... | |
| class | RecursiveTryLockTask |
| Tests TryLock() recursive acquisition by the owning task. More... | |
| class | YieldUnderContentionTask |
| Tests that Lock() yields cooperatively when spin count is exhausted. More... | |
| class | UnlockTransferTask |
| Tests that Unlock() correctly transfers the lock to a waiting contender. More... | |
| class | StressTestTask |
| Stress test mixing Lock() and TryLock() under full five-task contention. More... | |
Functions | |
| static void | ResetTestState () |
Variables | |
| static volatile int32_t | g_TestResult = 0 |
| static volatile int32_t | g_SharedCounter = 0 |
| static volatile int32_t | g_OrderIndex = 0 |
| static volatile bool | g_TestComplete = false |
| static volatile int32_t | g_InstancesDone = 0 |
| static Kernel< KERNEL_DYNAMIC, 5, SwitchStrategyRR, PlatformDefault > | g_Kernel |
| static sync::SpinLock | g_TestSpinLock |
Namespace of SpinLock test.
|
static |
Definition at line 511 of file test_spinlock.cpp.
References g_InstancesDone, g_OrderIndex, g_SharedCounter, g_TestComplete, and g_TestResult.
Referenced by RunTest().
|
static |
Definition at line 47 of file test_spinlock.cpp.
Referenced by ResetTestState(), stk::test::spinlock::MutualExclusionTask< _AccessMode >::Run(), stk::test::spinlock::RecursiveLockTask< _AccessMode >::Run(), stk::test::spinlock::RecursiveTryLockTask< _AccessMode >::Run(), stk::test::spinlock::StressTestTask< _AccessMode >::Run(), stk::test::spinlock::TryLockContendedTask< _AccessMode >::Run(), stk::test::spinlock::TryLockFreeTask< _AccessMode >::Run(), stk::test::spinlock::UnlockTransferTask< _AccessMode >::Run(), and stk::test::spinlock::YieldUnderContentionTask< _AccessMode >::Run().
|
static |
Definition at line 50 of file test_spinlock.cpp.
|
static |
Definition at line 45 of file test_spinlock.cpp.
Referenced by ResetTestState().
|
static |
Definition at line 44 of file test_spinlock.cpp.
Referenced by stk::test::spinlock::RecursiveLockTask< _AccessMode >::AcquireRecursive(), ResetTestState(), stk::test::spinlock::MutualExclusionTask< _AccessMode >::Run(), stk::test::spinlock::RecursiveLockTask< _AccessMode >::Run(), stk::test::spinlock::RecursiveTryLockTask< _AccessMode >::Run(), stk::test::spinlock::StressTestTask< _AccessMode >::Run(), stk::test::spinlock::TryLockContendedTask< _AccessMode >::Run(), stk::test::spinlock::TryLockFreeTask< _AccessMode >::Run(), stk::test::spinlock::UnlockTransferTask< _AccessMode >::Run(), and stk::test::spinlock::YieldUnderContentionTask< _AccessMode >::Run().
|
static |
Definition at line 46 of file test_spinlock.cpp.
Referenced by ResetTestState().
|
static |
Definition at line 43 of file test_spinlock.cpp.
Referenced by ResetTestState(), stk::test::spinlock::MutualExclusionTask< _AccessMode >::Run(), stk::test::spinlock::RecursiveLockTask< _AccessMode >::Run(), stk::test::spinlock::RecursiveTryLockTask< _AccessMode >::Run(), stk::test::spinlock::StressTestTask< _AccessMode >::Run(), stk::test::spinlock::TryLockContendedTask< _AccessMode >::Run(), stk::test::spinlock::TryLockFreeTask< _AccessMode >::Run(), stk::test::spinlock::UnlockTransferTask< _AccessMode >::Run(), stk::test::spinlock::YieldUnderContentionTask< _AccessMode >::Run(), and RunTest().
|
static |
Definition at line 53 of file test_spinlock.cpp.
Referenced by stk::test::spinlock::RecursiveLockTask< _AccessMode >::AcquireRecursive(), stk::test::spinlock::MutualExclusionTask< _AccessMode >::Run(), stk::test::spinlock::RecursiveTryLockTask< _AccessMode >::Run(), stk::test::spinlock::StressTestTask< _AccessMode >::Run(), stk::test::spinlock::TryLockContendedTask< _AccessMode >::Run(), stk::test::spinlock::TryLockFreeTask< _AccessMode >::Run(), stk::test::spinlock::UnlockTransferTask< _AccessMode >::Run(), and stk::test::spinlock::YieldUnderContentionTask< _AccessMode >::Run().