SuperTinyKernel™ RTOS 1.05.3
Lightweight, high-performance, deterministic, bare-metal C++ RTOS for resource-constrained embedded systems. MIT Open Source License.
Loading...
Searching...
No Matches
stk::test::rwmutex Namespace Reference

Namespace of RWMutex test. More...

Classes

class  ConcurrentReadersTask
 Tests that multiple readers can acquire ReadLock() simultaneously. More...
class  WriterExclusivityTask
 Tests that writer Lock()/Unlock() provides mutual exclusion. More...
class  WriterStarvationTask
 Tests writer preference policy: writers don't starve under reader flood. More...
class  TimedReadLockTask
 Tests TimedReadLock() timeout behavior. More...
class  TimedWriteLockTask
 Tests TimedLock() timeout behavior for writers. More...
class  TryReadLockWhileWriterTask
 Tests TryReadLock() returns false when writer is active; true after release. More...
class  ReadUnlockWakesWriterTask
 Tests that the last reader releasing wakes a waiting writer immediately. More...
class  WriterPriorityTask
 Tests writer preference policy: new readers are blocked when writers are waiting. More...
class  ReaderWriterAlternationTask
 Tests alternating read and write phases with multiple concurrent readers. More...
class  StressTestTask
 Stress test mixing readers and writers 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_ReaderCount = 0
static volatile int32_t g_WriterCount = 0
static volatile int32_t g_MaxConcurrent = 0
static volatile bool g_TestComplete = false
static volatile int32_t g_InstancesDone = 0
static Kernel< KERNEL_DYNAMIC|KERNEL_SYNC, 5, SwitchStrategyRR, PlatformDefaultg_Kernel
static sync::RWMutex g_TestRWMutex

Detailed Description

Namespace of RWMutex test.

Function Documentation

◆ ResetTestState()

void stk::test::rwmutex::ResetTestState ( )
static

Definition at line 702 of file test_rwmutex.cpp.

703{
704 g_TestResult = 0;
705 g_SharedCounter = 0;
706 g_ReaderCount = 0;
707 g_WriterCount = 0;
708 g_MaxConcurrent = 0;
709 g_TestComplete = false;
710 g_InstancesDone = 0;
711}
static volatile int32_t g_SharedCounter
static volatile int32_t g_InstancesDone
static volatile bool g_TestComplete
static volatile int32_t g_WriterCount
static volatile int32_t g_ReaderCount
static volatile int32_t g_TestResult
static volatile int32_t g_MaxConcurrent

References g_InstancesDone, g_MaxConcurrent, g_ReaderCount, g_SharedCounter, g_TestComplete, g_TestResult, and g_WriterCount.

Referenced by RunTest().

Here is the caller graph for this function:

Variable Documentation

◆ g_InstancesDone

◆ g_Kernel

Kernel<KERNEL_DYNAMIC | KERNEL_SYNC, 5 , SwitchStrategyRR, PlatformDefault> stk::test::rwmutex::g_Kernel
static

Definition at line 53 of file test_rwmutex.cpp.

Referenced by main(), and RunTest().

◆ g_MaxConcurrent

volatile int32_t stk::test::rwmutex::g_MaxConcurrent = 0
static

◆ g_ReaderCount

◆ g_SharedCounter

◆ g_TestComplete

volatile bool stk::test::rwmutex::g_TestComplete = false
static

◆ g_TestResult

◆ g_TestRWMutex

◆ g_WriterCount

volatile int32_t stk::test::rwmutex::g_WriterCount = 0
static