Mark3 Realtime Kernel
|
The PriorityMapL1 class This class implements a priority bitmap data structure. Each bit in the objects internal storage represents a priority. When a bit is set, it indicates that something is scheduled at the bit's corresponding priority, when a bit is clear it indicates that no entities are scheduled at that priority. This object provides the fundamental logic required to implement efficient priority-based scheduling for the thread + coroutine schedulers in the kernel. More...
#include <priomapl1.h>
Public Member Functions | |
PriorityMapL1 () | |
PriorityMap Initialize the priority map object, clearing the bitamp data to all 0's. More... | |
void | Set (T uXPrio_) |
Set Set the priority map bitmap data, at all levels, for the given priority. More... | |
void | Clear (T uXPrio_) |
Clear Clear the priority map bitmap data, at all levels, for the given priority. More... | |
T | HighestPriority (void) |
HighestPriority Computes the numeric priority of the highest-priority thread represented in the priority map. More... | |
Static Private Member Functions | |
static T | PrioBit (T prio) |
static T | PrioMapWordIndex (T prio) |
static T | PriorityFromBitmap (T uXPrio_) |
Private Attributes | |
T | m_uXPriorityMap |
Static Private Attributes | |
static constexpr size_t | m_uXPrioMapShiftLUT [9] = {0, 3, 4, 0, 5, 0, 0, 0, 6} |
static constexpr auto | m_uXPrioMapWordShift = T { m_uXPrioMapShiftLUT[sizeof(T)] } |
static constexpr auto | m_uXPrioMapBits = T { 8 * sizeof(T) } |
static constexpr auto | m_uXPrioMapBitMask = T { (1 << m_uXPrioMapWordShift) - 1 } |
The PriorityMapL1 class This class implements a priority bitmap data structure. Each bit in the objects internal storage represents a priority. When a bit is set, it indicates that something is scheduled at the bit's corresponding priority, when a bit is clear it indicates that no entities are scheduled at that priority. This object provides the fundamental logic required to implement efficient priority-based scheduling for the thread + coroutine schedulers in the kernel.
The L1 version of the datastructure uses a single unsigned integer (specified by the templated typname "T"), to support "C" priorities. Thus, the maximum number of priorities supported in the map is the number of bits in the "T" parameter.
Definition at line 45 of file priomapl1.h.
|
inline |
PriorityMap Initialize the priority map object, clearing the bitamp data to all 0's.
Definition at line 52 of file priomapl1.h.
|
inline |
Clear Clear the priority map bitmap data, at all levels, for the given priority.
uXPrio_ | Priority level to clear the bitmap data for. |
Definition at line 73 of file priomapl1.h.
|
inline |
HighestPriority Computes the numeric priority of the highest-priority thread represented in the priority map.
Definition at line 86 of file priomapl1.h.
|
inlinestaticprivate |
Definition at line 93 of file priomapl1.h.
|
inlinestaticprivate |
Definition at line 95 of file priomapl1.h.
|
inlinestaticprivate |
Definition at line 97 of file priomapl1.h.
|
inline |
Set Set the priority map bitmap data, at all levels, for the given priority.
uXPrio_ | Priority level to set the bitmap data for. |
Definition at line 62 of file priomapl1.h.
|
staticprivate |
Definition at line 122 of file priomapl1.h.
|
staticprivate |
Definition at line 121 of file priomapl1.h.
|
staticprivate |
Definition at line 119 of file priomapl1.h.
|
staticprivate |
Definition at line 120 of file priomapl1.h.
|
private |
Definition at line 124 of file priomapl1.h.