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

Namespace of Pipe test. More...

Classes

class  BasicWriteReadTask
 Tests basic Write()/Read() functionality in producer-consumer arrangement. More...
class  WriteBlocksWhenFullTask
 Tests that Write() blocks when the pipe is full and unblocks when space is freed. More...
class  ReadBlocksWhenEmptyTask
 Tests that Read() blocks when the pipe is empty and unblocks when data arrives. More...
class  TimeoutTask
 Tests that Write() and Read() return false within the expected time on timeout. More...
class  BulkWriteReadTask
 Tests WriteBulk()/ReadBulk() for multi-element block transfers. More...
class  GetSizeIsEmptyTask
 Tests GetSize() and IsEmpty() reflect accurate pipe state. More...
class  MultiProducerConsumerTask
 Tests concurrent multi-producer / multi-consumer throughput. More...
class  StressTestTask
 Stress test of Pipe 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 bool g_TestComplete = false
static volatile int32_t g_InstancesDone = 0
static Kernel< KERNEL_DYNAMIC|KERNEL_SYNC, 5, SwitchStrategyRR, PlatformDefaultg_Kernel
static sync::Pipe< int32_t, 8 > g_TestPipe

Detailed Description

Namespace of Pipe test.

Function Documentation

◆ ResetTestState()

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

Definition at line 527 of file test_pipe.cpp.

528{
529 g_TestResult = 0;
530 g_SharedCounter = 0;
531 g_TestComplete = false;
532 g_InstancesDone = 0;
533
534 // Re-construct the pipe in-place for a clean state; the pipe destructor does not assert
535 // on non-empty state (unlike ConditionVariable), but reconstruction ensures m_head,
536 // m_tail, m_count and both condition variables are fully reset between tests
537 g_TestPipe.~Pipe();
539}
static sync::Pipe< int32_t, 8 > g_TestPipe
Definition test_pipe.cpp:59
static volatile int32_t g_InstancesDone
Definition test_pipe.cpp:53
static volatile int32_t g_SharedCounter
Definition test_pipe.cpp:51
static volatile bool g_TestComplete
Definition test_pipe.cpp:52
static volatile int32_t g_TestResult
Definition test_pipe.cpp:50
Thread-safe FIFO communication pipe for inter-task data passing.

References g_InstancesDone, g_SharedCounter, g_TestComplete, g_TestPipe, and g_TestResult.

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::pipe::g_Kernel
static

Definition at line 56 of file test_pipe.cpp.

Referenced by main(), and RunTest().

◆ g_SharedCounter

◆ g_TestComplete

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

Definition at line 52 of file test_pipe.cpp.

Referenced by ResetTestState().

◆ g_TestPipe

◆ g_TestResult