QP/C  7.0.0
Real-Time Embedded Framework
qpset.h File Reference

QP native, platform-independent priority sets of 32 or 64 elements. More...

Go to the source code of this file.

Data Structures

struct  QPSet
 

Typedefs

typedef uint8_t QPSetBits
 

Functions

uint_fast8_t QF_LOG2 (QPSetBits x)
 
static void QPSet_setEmpty (QPSet *const me)
 
static bool QPSet_isEmpty (QPSet *const me)
 
static bool QPSet_notEmpty (QPSet *const me)
 
static bool QPSet_hasElement (QPSet *const me, uint_fast8_t const n)
 
static void QPSet_insert (QPSet *const me, uint_fast8_t const n)
 
static void QPSet_remove (QPSet *const me, uint_fast8_t const n)
 
static uint_fast8_t QPSet_findMax (QPSet *const me)
 

Detailed Description

Date
Last updated on: 2021-12-30
Version
Last updated for: Version 7.0.0, 2022-04-30

Definition in file qpset.h.


Data Structure Documentation

◆ QPSet

struct QPSet

Priority Set of up to 32 elements The priority set represents the set of active objects that are ready to run and need to be considered by the scheduling algorithm. The set is capable of storing up to 32 priority levels.

Definition at line 65 of file qpset.h.

Data Fields
QPSetBits volatile bits

bitmask with a bit for each element

Typedef Documentation

◆ QPSetBits

typedef uint8_t QPSetBits

Definition at line 43 of file qpset.h.

Function Documentation

◆ QF_LOG2()

uint_fast8_t QF_LOG2 ( QPSetBits  x)

◆ QPSet_setEmpty()

static void QPSet_setEmpty ( QPSet *const  me)
inlinestatic

Makes the priority set me empty

Definition at line 70 of file qpset.h.

◆ QPSet_isEmpty()

static bool QPSet_isEmpty ( QPSet *const  me)
inlinestatic

Evaluates to TRUE if the priority set me is empty

Definition at line 75 of file qpset.h.

◆ QPSet_notEmpty()

static bool QPSet_notEmpty ( QPSet *const  me)
inlinestatic

Evaluates to TRUE if the priority set me is not empty

Definition at line 80 of file qpset.h.

◆ QPSet_hasElement()

static bool QPSet_hasElement ( QPSet *const  me,
uint_fast8_t const  n 
)
inlinestatic

Evaluates to TRUE if the priority set me has element n

Definition at line 85 of file qpset.h.

◆ QPSet_insert()

static void QPSet_insert ( QPSet *const  me,
uint_fast8_t const  n 
)
inlinestatic

Insert element n_ into the set me, n = 1U..32U

Definition at line 90 of file qpset.h.

◆ QPSet_remove()

static void QPSet_remove ( QPSet *const  me,
uint_fast8_t const  n 
)
inlinestatic

Remove element n_ from the set me, n = 1U..32U

Definition at line 95 of file qpset.h.

◆ QPSet_findMax()

static uint_fast8_t QPSet_findMax ( QPSet *const  me)
inlinestatic

Find the maximum element in the set me

Note
if the set me is empty, the function returns zero.

Definition at line 102 of file qpset.h.