|
SuperTinyKernel™ RTOS 1.08.x
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, Timeout &ticks)=0 |
| Called by ISR handler to notify about the next system tick. | |
| virtual void | OnTaskExit (const Stack *stack)=0 |
| Called from the Thread process when task finished (its Run function exited by return). | |
| virtual TId | OnGetTid (Word caller_SP)=0 |
| Called from the Thread process when for getting task/thread id of the process. | |
| virtual void | OnSuspend (bool suspended)=0 |
| Called by the driver when scheduling is suspended or resumed (tickless suspend, see IPlatform::Suspend). | |
| virtual bool | OnForceContextSwitch (TId id, Stack *&idle, Stack *&active)=0 |
| Called when a task state change forces a context switch (sleep, wait, suspend, yield, exit). | |
Interface for a back-end event handler.
It is inherited by the kernel implementation and delivers events from ISR.
Definition at line 1141 of file stk_common.h.
|
pure virtual |
Called when a task state change forces a context switch (sleep, wait, suspend, yield, exit).
| [in] | id | Task id causing this forced context switch. |
| [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). |
Implemented in stk::Kernel< TMode, TSize, TStrategy, TPlatform >.
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 by the driver when scheduling is suspended or resumed (tickless suspend, see IPlatform::Suspend).
| [in] | suspended | true if scheduling was suspended, false if it was resumed. |
Implemented in stk::Kernel< TMode, TSize, TStrategy, TPlatform >.
|
pure virtual |
Called from the Thread process when task finished (its Run function exited by return).
| [in] | stack | Stack of the exited task. |
Implemented in stk::Kernel< TMode, TSize, TStrategy, TPlatform >.
|
pure virtual |
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 >.