![]() |
SuperTinyKernel™ RTOS 1.06.x
Lightweight, high-performance, deterministic, bare-metal C++ RTOS for resource-constrained embedded systems. MIT Open Source License.
|
Public Types | |
| enum class | JoinState : uint8_t { Detached , Joinable , Exited , Joined } |
Public Member Functions | |
| StkThread () | |
| virtual | ~StkThread () |
| void | Run () override |
| Entry point of the user task. | |
| void | OnExit () override |
| Called by the kernel before removal from the scheduling (see stk::KERNEL_DYNAMIC). | |
| const stk::Word * | GetStack () const override |
| Get pointer to the stack memory. | |
| size_t | GetStackSize () const override |
| Get number of elements of the stack memory array. | |
| size_t | GetStackSizeBytes () const override |
| Get size of the memory in bytes. | |
| stk::EAccessMode | GetAccessMode () const override |
| Get hardware access mode of the user task. | |
| void | OnDeadlineMissed (uint32_t) override |
| Called by the scheduler if deadline of the task is missed when Kernel is operating in Hard Real-Time mode (see stk::KERNEL_HRT). | |
| int32_t | GetWeight () const override |
| Get static base weight of the task. | |
| const char * | GetTraceName () const override |
| Get task trace name set by application. | |
| TId | GetId () const |
| Get task Id set by application. | |
| virtual size_t | GetStackSpace () const |
| Get available stack space. | |
Public Attributes | |
| osThreadFunc_t | m_func |
| void * | m_argument |
| const char * | m_name |
| volatile int32_t | m_stk_priority |
| stk::Word * | m_stack |
| size_t | m_stack_size |
| volatile JoinState | m_join_state |
| stk::sync::ConditionVariable | m_join_cv |
| stk::sync::EventFlags | m_thread_flags |
| bool | m_stack_owned |
| bool | m_suspended |
| bool | m_cb_owned |
Definition at line 139 of file cmsis_os2_stk.cpp.
|
strong |
| Enumerator | |
|---|---|
| Detached | |
| Joinable | |
| Exited | |
| Joined | |
Definition at line 142 of file cmsis_os2_stk.cpp.
|
inlineexplicit |
Definition at line 150 of file cmsis_os2_stk.cpp.
References CmsisPrioToStk(), m_argument, m_cb_owned, m_func, m_join_state, m_name, m_stack, m_stack_owned, m_stack_size, m_stk_priority, m_suspended, and osPriorityNormal.
|
inlinevirtual |
Definition at line 157 of file cmsis_os2_stk.cpp.
References m_stack, and m_stack_owned.
|
inlineoverridevirtual |
Get hardware access mode of the user task.
Implements stk::ITask.
Definition at line 187 of file cmsis_os2_stk.cpp.
References stk::ACCESS_PRIVILEGED.
|
inlineinherited |
Get task Id set by application.
Implementation of ITask::GetId, see ITask. Placed here as it depends on GetTidFromUserTask.
Definition at line 234 of file stk_helper.h.
References stk::GetTidFromUserTask().
Referenced by stk::Kernel< TMode, TSize, TStrategy, TPlatform >::KernelTask::Bind(), and stk_task_get_id().
|
inlineoverridevirtual |
Get pointer to the stack memory.
Implements stk::IStackMemory.
Definition at line 182 of file cmsis_os2_stk.cpp.
References m_stack.
|
inlineoverridevirtual |
Get number of elements of the stack memory array.
Implements stk::IStackMemory.
Definition at line 183 of file cmsis_os2_stk.cpp.
References m_stack_size.
|
inlineoverridevirtual |
Get size of the memory in bytes.
Implements stk::IStackMemory.
Definition at line 184 of file cmsis_os2_stk.cpp.
References m_stack_size.
Referenced by osThreadGetStackSize().
|
inlinevirtualinherited |
Get available stack space.
Definition at line 318 of file stk_common.h.
References stk::ArrayView< T >::GetSize(), GetStack(), GetStackSize(), and STK_STACK_MEMORY_FILLER.
Referenced by FrtosTask::GetStackHighWaterMark(), and osThreadGetStackSpace().
|
inlineoverridevirtual |
Get task trace name set by application.
NULL if unused. Reimplemented from stk::ITask.
Definition at line 190 of file cmsis_os2_stk.cpp.
References m_name.
|
inlineoverridevirtual |
Get static base weight of the task.
Reimplemented from stk::ITask.
Definition at line 189 of file cmsis_os2_stk.cpp.
References m_stk_priority.
|
inlineoverridevirtual |
Called by the scheduler if deadline of the task is missed when Kernel is operating in Hard Real-Time mode (see stk::KERNEL_HRT).
| [in] | duration | Elapsed active time in ticks at the point the deadline was detected. Always greater than the task's configured deadline (ticks). |
Reimplemented from stk::ITask.
Definition at line 188 of file cmsis_os2_stk.cpp.
|
inlineoverridevirtual |
Called by the kernel before removal from the scheduling (see stk::KERNEL_DYNAMIC).
Reimplemented from stk::ITask.
Definition at line 173 of file cmsis_os2_stk.cpp.
References Exited, m_join_cv, and m_join_state.
|
inlineoverridevirtual |
Entry point of the user task.
Kernel is configured as KERNEL_STATIC, the body must contain an infinite loop. Implements stk::ITask.
Definition at line 166 of file cmsis_os2_stk.cpp.
References m_argument, and m_func.
| void* StkThread::m_argument |
Definition at line 194 of file cmsis_os2_stk.cpp.
Referenced by osThreadNew(), Run(), and StkThread().
| bool StkThread::m_cb_owned |
Definition at line 204 of file cmsis_os2_stk.cpp.
Referenced by StkThread().
| osThreadFunc_t StkThread::m_func |
Definition at line 193 of file cmsis_os2_stk.cpp.
Referenced by osThreadNew(), Run(), and StkThread().
| stk::sync::ConditionVariable StkThread::m_join_cv |
Definition at line 200 of file cmsis_os2_stk.cpp.
Referenced by OnExit(), and osThreadJoin().
| volatile JoinState StkThread::m_join_state |
Definition at line 199 of file cmsis_os2_stk.cpp.
Referenced by OnExit(), osThreadDetach(), osThreadJoin(), osThreadNew(), osThreadTerminate(), and StkThread().
| const char* StkThread::m_name |
Definition at line 195 of file cmsis_os2_stk.cpp.
Referenced by GetTraceName(), osThreadNew(), and StkThread().
| stk::Word* StkThread::m_stack |
Definition at line 197 of file cmsis_os2_stk.cpp.
Referenced by GetStack(), osThreadNew(), StkThread(), and ~StkThread().
| bool StkThread::m_stack_owned |
Definition at line 202 of file cmsis_os2_stk.cpp.
Referenced by osThreadNew(), StkThread(), and ~StkThread().
| size_t StkThread::m_stack_size |
Definition at line 198 of file cmsis_os2_stk.cpp.
Referenced by GetStackSize(), GetStackSizeBytes(), osThreadNew(), and StkThread().
| volatile int32_t StkThread::m_stk_priority |
Definition at line 196 of file cmsis_os2_stk.cpp.
Referenced by GetWeight(), osThreadGetPriority(), osThreadNew(), osThreadSetPriority(), and StkThread().
| bool StkThread::m_suspended |
Definition at line 203 of file cmsis_os2_stk.cpp.
Referenced by osThreadGetState(), osThreadResume(), osThreadSuspend(), and StkThread().
| stk::sync::EventFlags StkThread::m_thread_flags |
Definition at line 201 of file cmsis_os2_stk.cpp.
Referenced by osThreadFlagsClear(), osThreadFlagsSet(), and osThreadFlagsWait().