SuperTinyKernel™ RTOS 1.06.x
Lightweight, high-performance, deterministic, bare-metal C++ RTOS for resource-constrained embedded systems. MIT Open Source License.
Loading...
Searching...
No Matches
stk::SchedulabilityCheck::SchedulabilityCheckResult< TTaskCount > Class Template Reference

Result of a WCRT schedulability test: overall verdict plus per-task details. More...

#include <stk_strategy_monotonic.h>

Collaboration diagram for stk::SchedulabilityCheck::SchedulabilityCheckResult< TTaskCount >:

Public Member Functions

 operator bool () const
 Check whether the full task set is schedulable.

Public Attributes

bool schedulable
 true if every task's WCRT <= its period (T); false if any task misses its deadline.
TaskInfo info [TTaskCount]
 Per-task analysis results, ordered highest priority first (index 0 = highest priority task).

Detailed Description

template<uint32_t TTaskCount>
class stk::SchedulabilityCheck::SchedulabilityCheckResult< TTaskCount >

Result of a WCRT schedulability test: overall verdict plus per-task details.

The number of tasks is fixed at compile time through the TTaskCount template parameter, which must equal the number of tasks registered with the kernel strategy. Array indices match the priority-sorted task order: index 0 = highest-priority task.

Usage example:

// Analyse 3 HRT tasks registered with a Rate-Monotonic kernel.
auto *rm = static_cast<stk::SwitchStrategyRM *>(kernel.GetSwitchStrategy());
STK_ASSERT(result); // assert all tasks meet their deadlines
#define STK_ASSERT(e)
Runtime assertion. Halts execution if the expression e evaluates to false.
Definition stk_defs.h:409
SwitchStrategyMonotonic< MSS_TYPE_RATE > SwitchStrategyRM
Shorthand alias for SwitchStrategyMonotonic<MSS_TYPE_RATE>: Rate-Monotonic scheduling (shorter schedu...
static SchedulabilityCheckResult< TTaskCount > IsSchedulableWCRT(const ITaskSwitchStrategy *strategy)
Perform WCRT schedulability analysis on the task set registered with strategy.

Definition at line 330 of file stk_strategy_monotonic.h.

Member Function Documentation

◆ operator bool()

template<uint32_t TTaskCount>
stk::SchedulabilityCheck::SchedulabilityCheckResult< TTaskCount >::operator bool ( ) const
inline

Check whether the full task set is schedulable.

Returns
true if all tasks meet their deadlines; false otherwise.

Definition at line 338 of file stk_strategy_monotonic.h.

338{ return schedulable; }
bool schedulable
true if every task's WCRT <= its period (T); false if any task misses its deadline.

References schedulable.

Member Data Documentation

◆ info

template<uint32_t TTaskCount>
TaskInfo stk::SchedulabilityCheck::SchedulabilityCheckResult< TTaskCount >::info[TTaskCount]

Per-task analysis results, ordered highest priority first (index 0 = highest priority task).

Definition at line 333 of file stk_strategy_monotonic.h.

Referenced by stk::SchedulabilityCheck::IsSchedulableWCRT().

◆ schedulable

template<uint32_t TTaskCount>
bool stk::SchedulabilityCheck::SchedulabilityCheckResult< TTaskCount >::schedulable

true if every task's WCRT <= its period (T); false if any task misses its deadline.

Definition at line 332 of file stk_strategy_monotonic.h.

Referenced by stk::SchedulabilityCheck::IsSchedulableWCRT(), and operator bool().


The documentation for this class was generated from the following file: