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::mutex Namespace Reference

Namespace of Mutex test. More...

Classes

class  BasicLockUnlockTask
 Tests basic lock/unlock functionality. More...
class  RecursiveLockTask
 Tests recursive locking capability. More...
class  TryLockTask
 Tests TryLock() non-blocking behavior. More...
class  TimedLockTask
 Tests TimedLock() timeout behavior. More...
class  FIFOOrderTask
 Tests FIFO ordering of waiting threads. More...
class  StressTestTask
 Stress test with many lock/unlock cycles. More...
class  RecursiveDepthTask
 Tests deep recursive locking. More...
class  InterTaskCoordinationTask
 Tests mutex for coordinating work between tasks. 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_AcquisitionOrder [5] = {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|KERNEL_SYNC|(STK_TICKLESS_IDLE ? KERNEL_TICKLESS :0), 5, SwitchStrategyRR, PlatformDefaultg_Kernel
static sync::Mutex g_TestMutex

Detailed Description

Namespace of Mutex test.

Function Documentation

◆ ResetTestState()

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

Definition at line 507 of file test_mutex.cpp.

508{
509 g_TestResult = 0;
510 g_SharedCounter = 0;
511 g_OrderIndex = 0;
512 g_TestComplete = false;
513 g_InstancesDone = 0;
514
515 for (int32_t i = 0; i < _STK_MUTEX_TEST_TASKS_MAX; ++i)
516 g_AcquisitionOrder[i] = 0;
517}
#define _STK_MUTEX_TEST_TASKS_MAX
static volatile int32_t g_InstancesDone
static volatile int32_t g_OrderIndex
static volatile int32_t g_TestResult
static volatile int32_t g_SharedCounter
static volatile bool g_TestComplete
static volatile int32_t g_AcquisitionOrder[5]

References _STK_MUTEX_TEST_TASKS_MAX, g_AcquisitionOrder, g_InstancesDone, g_OrderIndex, g_SharedCounter, g_TestComplete, and g_TestResult.

Referenced by RunTest().

Here is the caller graph for this function:

Variable Documentation

◆ g_AcquisitionOrder

volatile int32_t stk::test::mutex::g_AcquisitionOrder[5] = {0}
static

Definition at line 46 of file test_mutex.cpp.

46{0};

Referenced by ResetTestState(), and stk::test::mutex::FIFOOrderTask< _AccessMode >::Run().

◆ g_InstancesDone

◆ g_Kernel

Definition at line 53 of file test_mutex.cpp.

Referenced by main(), and RunTest().

◆ g_OrderIndex

volatile int32_t stk::test::mutex::g_OrderIndex = 0
static

◆ g_SharedCounter

◆ g_TestComplete

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

Definition at line 48 of file test_mutex.cpp.

Referenced by ResetTestState().

◆ g_TestMutex

◆ g_TestResult