|
SuperTinyKernel™ RTOS 1.08.x
Lightweight, high-performance, deterministic, bare-metal C++ RTOS for resource-constrained embedded systems. MIT Open Source License.
|
Operations on the "ready priorities" bitmap used by SwitchStrategyFixedPriority and SwitchStrategyPreemptionThreshold. More...
#include <stk_priority_bitmap.h>
Public Types | |
| enum | { CAPACITY = (sizeof(BitmapT) * 8U) } |
Static Public Member Functions | |
| static __stk_forceinline void | Set (BitmapT &bitmap, uint32_t bit) |
| Set bit bit. | |
| static __stk_forceinline void | Clear (BitmapT &bitmap, uint32_t bit) |
| Clear bit bit. | |
| static __stk_forceinline bool | IsSet (const BitmapT &bitmap, uint32_t bit) |
| Check that bit bit is set. | |
| static __stk_forceinline bool | IsEmpty (const BitmapT &bitmap) |
| Check that no bit is set. | |
| static __stk_forceinline uint32_t | HighestSet (const BitmapT &bitmap) |
| Index of the most significant set bit. | |
Operations on the "ready priorities" bitmap used by SwitchStrategyFixedPriority and SwitchStrategyPreemptionThreshold.
The primary template supports any unsigned integer type (uint8_t, uint16_t, uint32_t, uint64_t). To support more priority levels than a native integer can hold use stk::sched::PriorityBitmap (96, 128, ..., 1024 priorities, its traits are provided below), or define your own bitmap class and provide a full specialization of this template for it. A specialization must provide:
The bitmap class itself must be default-constructible into the empty state (all bits clear), because the strategy value-initializes it.
Definition at line 84 of file stk_priority_bitmap.h.
| anonymous enum |
| Enumerator | |
|---|---|
| CAPACITY | |
Definition at line 86 of file stk_priority_bitmap.h.
|
inlinestatic |
Clear bit bit.
Definition at line 95 of file stk_priority_bitmap.h.
|
inlinestatic |
Index of the most significant set bit.
Definition at line 113 of file stk_priority_bitmap.h.
|
inlinestatic |
Check that no bit is set.
Definition at line 107 of file stk_priority_bitmap.h.
Referenced by stk::sched::SwitchStrategyFixedPriority< 32 >::GetFirst(), stk::sched::SwitchStrategyPreemptionThreshold< 32 >::GetFirst(), stk::sched::SwitchStrategyFixedPriority< 32 >::GetNext(), and stk::sched::SwitchStrategyPreemptionThreshold< 32 >::GetNext().
|
inlinestatic |
|
inlinestatic |