![]() |
SuperTinyKernel™ RTOS 1.05.3
Lightweight, high-performance, deterministic, bare-metal C++ RTOS for resource-constrained embedded systems. MIT Open Source License.
|
Interface for a back-end event handler. More...
#include <stk_common.h>
Public Member Functions | |
| virtual void | OnStart (Stack *&active)=0 |
| Called by ISR handler to notify that scheduling is about to start. | |
| virtual void | OnStop ()=0 |
| Called by driver to notify that scheduling is stopped. | |
| virtual bool | OnTick (Stack *&idle, Stack *&active)=0 |
| Called by ISR handler to notify about the next system tick. | |
| virtual void | OnTaskSwitch (Word caller_SP)=0 |
| Called by Thread process (via IKernelService::SwitchToNext) to switch to a next task. | |
| virtual void | OnTaskSleep (Word caller_SP, Timeout ticks)=0 |
| Called by Thread process (via IKernelService::Sleep) for exclusion of the calling process from scheduling (sleeping). | |
| virtual void | OnTaskSleepUntil (Word caller_SP, Ticks timestamp)=0 |
| Called by Thread process (via IKernelService::SleepUntil) for exclusion of the calling process from scheduling (sleeping). | |
| virtual void | OnTaskExit (Stack *stack)=0 |
| Called from the Thread process when task finished (its Run function exited by return). | |
| virtual IWaitObject * | OnTaskWait (Word caller_SP, ISyncObject *sync_obj, IMutex *mutex, Timeout timeout)=0 |
| Called from the Thread process when task needs to wait. | |
| virtual TId | OnGetTid (Word caller_SP)=0 |
| Called from the Thread process when for getting task/thread id of the process. | |
Interface for a back-end event handler.
It is inherited by the kernel implementation and delivers events from ISR.
Definition at line 582 of file stk_common.h.
Called from the Thread process when for getting task/thread id of the process.
| [in] | caller_SP | Value of Stack Pointer (SP) register (for locating the calling process inside the kernel). |
Implemented in stk::Kernel< TMode, TSize, TStrategy, TPlatform >.
|
pure virtual |
Called by ISR handler to notify that scheduling is about to start.
| [out] | active | Stack of the task which must enter Active state (to which context will switch). |
Implemented in stk::Kernel< TMode, TSize, TStrategy, TPlatform >.
|
pure virtual |
Called by driver to notify that scheduling is stopped.
Implemented in stk::Kernel< TMode, TSize, TStrategy, TPlatform >.
|
pure virtual |
Called from the Thread process when task finished (its Run function exited by return).
| [out] | stack | Stack of the exited task. |
Implemented in stk::Kernel< TMode, TSize, TStrategy, TPlatform >.
|
pure virtual |
Called by Thread process (via IKernelService::Sleep) for exclusion of the calling process from scheduling (sleeping).
| [in] | caller_SP | Value of Stack Pointer (SP) register (for locating the calling process inside the kernel). |
| [in] | ticks | Time to sleep (ticks). |
Implemented in stk::Kernel< TMode, TSize, TStrategy, TPlatform >.
|
pure virtual |
Called by Thread process (via IKernelService::SleepUntil) for exclusion of the calling process from scheduling (sleeping).
| [in] | caller_SP | Value of Stack Pointer (SP) register (for locating the calling process inside the kernel). |
| [in] | timestamp | Absolute timestamp (ticks). |
Implemented in stk::Kernel< TMode, TSize, TStrategy, TPlatform >.
|
pure virtual |
Called by Thread process (via IKernelService::SwitchToNext) to switch to a next task.
| [in] | caller_SP | Value of Stack Pointer (SP) register (for locating the calling process inside the kernel). |
Implemented in stk::Kernel< TMode, TSize, TStrategy, TPlatform >.
|
pure virtual |
Called from the Thread process when task needs to wait.
| [in] | caller_SP | Value of Stack Pointer (SP) register (for locating the calling process inside the kernel). |
| [in] | sync_obj | ISyncObject instance (passed by Wait). |
| [in] | mutex | IMutex instance (passed by Wait). |
| [in] | timeout | Time to sleep (ticks). |
Implemented in stk::Kernel< TMode, TSize, TStrategy, TPlatform >.
Called by ISR handler to notify about the next system tick.
| [out] | idle | Stack of the task which must enter Idle state. |
| [out] | active | Stack of the task which must enter Active state (to which context will switch). |
| [in,out] | ticks | (STK_TICKLESS_IDLE=1 only) On entry: actual ticks elapsed since the previous call, as measured by the platform driver. On return: the minimum remaining sleep ticks across all active tasks, clamped to [1, STK_TICKLESS_TICKS_MAX]. Platform driver programs this value into the hardware timer to suppress unnecessary wakeups. Absent in non-tickless builds. |
Implemented in stk::Kernel< TMode, TSize, TStrategy, TPlatform >.
References STK_TICKLESS_IDLE.