![]() |
SuperTinyKernel™ RTOS 1.05.3
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 () | |
| Destructor. | |
| Word * | GetStack () const |
| Get pointer to the first element of the wrapped stack array. | |
| size_t | GetStackSize () const |
| Get number of elements in the wrapped stack array. | |
| size_t | GetStackSizeBytes () const |
| Get size of the wrapped stack array in bytes. | |
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 173 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 179 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 186 of file stk_helper.h.
|
inline |
Destructor.
Definition at line 194 of file stk_helper.h.
|
inlinevirtual |
Get pointer to the first element of the wrapped stack array.
Implements stk::IStackMemory.
Definition at line 199 of file stk_helper.h.
Referenced by stk::test::TEST().
|
inlinevirtual |
Get number of elements in the wrapped stack array.
Implements stk::IStackMemory.
Definition at line 203 of file stk_helper.h.
Referenced by stk::test::TEST().
|
inlinevirtual |
Get size of the wrapped stack array in bytes.
Implements stk::IStackMemory.
Definition at line 207 of file stk_helper.h.
Referenced by stk::test::TEST().
|
private |
Pointer to the externally-owned stack memory array.
Definition at line 210 of file stk_helper.h.