![]() |
SuperTinyKernel™ RTOS 1.06.x
Lightweight, high-performance, deterministic, bare-metal C++ RTOS for resource-constrained embedded systems. MIT Open Source License.
|
Adapts an externally-owned stack memory array to the IStackMemory interface. More...
#include <stk_helper.h>
Public Types | |
| typedef StackMemoryDef< _StackSize >::Type | MemoryType |
| The concrete array type that this wrapper accepts, equivalent to StackMemoryDef<_StackSize>::Type. | |
Public Member Functions | |
| StackMemoryWrapper (MemoryType *stack) | |
| Construct a wrapper around an existing stack memory array. | |
| ~StackMemoryWrapper ()=default | |
| Destructor. | |
| const Word * | GetStack () const override |
| Get pointer to the first element of the wrapped stack array. | |
| size_t | GetStackSize () const override |
| Get number of elements in the wrapped stack array. | |
| size_t | GetStackSizeBytes () const override |
| Get size of the wrapped stack array in bytes. | |
| virtual size_t | GetStackSpace () const |
| Get available stack space. | |
Private Attributes | |
| MemoryType * | m_stack |
| Pointer to the externally-owned stack memory array. | |
Adapts an externally-owned stack memory array to the IStackMemory interface.
Definition at line 136 of file stk_helper.h.
| typedef StackMemoryDef<_StackSize>::Type stk::StackMemoryWrapper< _StackSize >::MemoryType |
The concrete array type that this wrapper accepts, equivalent to StackMemoryDef<_StackSize>::Type.
Definition at line 142 of file stk_helper.h.
|
inlineexplicit |
Construct a wrapper around an existing stack memory array.
| [in] | stack | Pointer to the externally-owned memory array. Must remain valid for the lifetime of this wrapper and of any kernel task using it. |
Definition at line 149 of file stk_helper.h.
|
default |
Destructor.
|
inlineoverridevirtual |
Get pointer to the first element of the wrapped stack array.
Implements stk::IStackMemory.
Definition at line 161 of file stk_helper.h.
|
inlineoverridevirtual |
Get number of elements in the wrapped stack array.
Implements stk::IStackMemory.
Definition at line 165 of file stk_helper.h.
|
inlineoverridevirtual |
Get size of the wrapped stack array in bytes.
Implements stk::IStackMemory.
Definition at line 169 of file stk_helper.h.
|
inlinevirtualinherited |
Get available stack space.
Definition at line 319 of file stk_common.h.
References stk::ArrayView< T >::GetSize(), GetStack(), GetStackSize(), and STK_STACK_MEMORY_FILLER.
Referenced by FrtosTask::GetStackHighWaterMark(), and osThreadGetStackSpace().
|
private |
Pointer to the externally-owned stack memory array.
Definition at line 172 of file stk_helper.h.