RTEMS
Files | Classes | Macros | Typedefs | Enumerations | Functions | Variables
Priority Handler

Priority Handler. More...

Files

file  priority.h
 Priority Handler API.
 
file  prioritybitmapimpl.h
 Inlined Routines in the Priority Handler Bit Map Implementation.
 
file  priorityimpl.h
 Priority Handler API Implementation.
 

Classes

struct  Priority_Node
 The priority node to build up a priority aggregation. More...
 
struct  Priority_Aggregation
 The priority aggregation. More...
 
struct  Priority_Actions
 A list of priority actions. More...
 

Macros

#define PRIORITY_MINIMUM   0
 The highest (most important) thread priority value.
 
#define PRIORITY_PSEUDO_ISR   PRIORITY_MINIMUM
 The priority value of pseudo-ISR threads. More...
 
#define PRIORITY_DEFAULT_MAXIMUM   255
 The default lowest (least important) thread priority value. More...
 

Typedefs

typedef uint64_t Priority_Control
 The thread priority control. More...
 
typedef struct Priority_Aggregation Priority_Aggregation
 
typedef void(* Priority_Add_handler) (Priority_Aggregation *aggregation, Priority_Actions *actions, void *arg)
 
typedef void(* Priority_Change_handler) (Priority_Aggregation *aggregation, bool prepend_it, Priority_Actions *actions, void *arg)
 
typedef void(* Priority_Remove_handler) (Priority_Aggregation *aggregation, Priority_Actions *actions, void *arg)
 

Enumerations

enum  Priority_Action_type { PRIORITY_ACTION_ADD, PRIORITY_ACTION_CHANGE, PRIORITY_ACTION_REMOVE, PRIORITY_ACTION_INVALID }
 The priority action type.
 

Functions

RTEMS_INLINE_ROUTINE unsigned int _Bitfield_Find_first_bit (unsigned int value)
 Returns the bit number of the first bit set in the specified value. More...
 
RTEMS_INLINE_ROUTINE Priority_bit_map_Word _Priority_Mask (unsigned int bit_number)
 Returns the priority bit mask for the specified major or minor bit number. More...
 
RTEMS_INLINE_ROUTINE unsigned int _Priority_Bits_index (unsigned int bit_number)
 Returns the bit index position for the specified major or minor bit number. More...
 
RTEMS_INLINE_ROUTINE unsigned int _Priority_Major (unsigned int the_priority)
 Returns the major portion of the_priority. More...
 
RTEMS_INLINE_ROUTINE unsigned int _Priority_Minor (unsigned int the_priority)
 Returns the minor portion of the_priority. More...
 
RTEMS_INLINE_ROUTINE void _Priority_bit_map_Initialize (Priority_bit_map_Control *bit_map)
 Initializes a bit map. More...
 
RTEMS_INLINE_ROUTINE void _Priority_bit_map_Add (Priority_bit_map_Control *bit_map, Priority_bit_map_Information *bit_map_info)
 Adds Priority queue bit map information. More...
 
RTEMS_INLINE_ROUTINE void _Priority_bit_map_Remove (Priority_bit_map_Control *bit_map, Priority_bit_map_Information *bit_map_info)
 Removes Priority queue bit map information. More...
 
RTEMS_INLINE_ROUTINE unsigned int _Priority_bit_map_Get_highest (const Priority_bit_map_Control *bit_map)
 Gets highest portion of Priority queue bit map. More...
 
RTEMS_INLINE_ROUTINE bool _Priority_bit_map_Is_empty (const Priority_bit_map_Control *bit_map)
 Checks if the Priority queue bit map is empty. More...
 
RTEMS_INLINE_ROUTINE void _Priority_bit_map_Initialize_information (Priority_bit_map_Control *bit_map, Priority_bit_map_Information *bit_map_info, unsigned int new_priority)
 Initializes the bit map information. More...
 
static __inline__ void _Priority_Actions_initialize_empty (Priority_Actions *actions)
 Initializes the priority actions empty. More...
 
static __inline__ void _Priority_Actions_initialize_one (Priority_Actions *actions, Priority_Aggregation *aggregation, Priority_Node *node, Priority_Action_type type)
 Initializes the priority actions with the given information. More...
 
static __inline__ bool _Priority_Actions_is_empty (const Priority_Actions *actions)
 Checks if the priority actions is empty. More...
 
static __inline__ bool _Priority_Actions_is_valid (const Priority_Aggregation *aggregation)
 Checks if the priority actions is valid. More...
 
static __inline__ Priority_Aggregation_Priority_Actions_move (Priority_Actions *actions)
 Moves the priority actions' actions. More...
 
static __inline__ void _Priority_Actions_add (Priority_Actions *actions, Priority_Aggregation *aggregation)
 Adds actions to the priority actions' actions. More...
 
static __inline__ void _Priority_Node_initialize (Priority_Node *node, Priority_Control priority)
 Initializes the priority node to the given priority. More...
 
static __inline__ void _Priority_Node_set_priority (Priority_Node *node, Priority_Control priority)
 Sets the priority of the priority node to the given priority. More...
 
static __inline__ void _Priority_Node_set_inactive (Priority_Node *node)
 Sets the priority node inactive. More...
 
static __inline__ bool _Priority_Node_is_active (const Priority_Node *node)
 Checks if the priority node is active. More...
 
static __inline__ void _Priority_Initialize_empty (Priority_Aggregation *aggregation)
 Initializes the priority aggregation empty. More...
 
static __inline__ void _Priority_Initialize_one (Priority_Aggregation *aggregation, Priority_Node *node)
 Initializes the priority aggregation with the given information. More...
 
static __inline__ bool _Priority_Is_empty (const Priority_Aggregation *aggregation)
 Checks if the priority aggregation is empty. More...
 
static __inline__ Priority_Control _Priority_Get_priority (const Priority_Aggregation *aggregation)
 Gets the priority aggregation's priority. More...
 
static __inline__ const Scheduler_Control_Priority_Get_scheduler (const Priority_Aggregation *aggregation)
 Gets the priority aggregation's scheduler. More...
 
static __inline__ Priority_Node_Priority_Get_minimum_node (const Priority_Aggregation *aggregation)
 Gets the minimum node of the priority aggregation. More...
 
static __inline__ void _Priority_Set_action_node (Priority_Aggregation *aggregation, Priority_Node *node)
 Sets the action node of the priority aggregation. More...
 
static __inline__ void _Priority_Set_action_type (Priority_Aggregation *aggregation, Priority_Action_type type)
 Sets the action type of the priority aggregation. More...
 
static __inline__ void _Priority_Set_action (Priority_Aggregation *aggregation, Priority_Node *node, Priority_Action_type type)
 Sets the action type and action node of the priority aggregation. More...
 
static __inline__ Priority_Aggregation_Priority_Get_next_action (const Priority_Aggregation *aggregation)
 Gets the next action of the priority aggregation. More...
 
static __inline__ bool _Priority_Less (const void *left, const RBTree_Node *right)
 Compares two priorities. More...
 
static __inline__ bool _Priority_Plain_insert (Priority_Aggregation *aggregation, Priority_Node *node, Priority_Control priority)
 Inserts the node with the given priority into the priority aggregation's contributors. More...
 
static __inline__ void _Priority_Plain_extract (Priority_Aggregation *aggregation, Priority_Node *node)
 Extracts the priority node from the aggregation. More...
 
static __inline__ void _Priority_Plain_changed (Priority_Aggregation *aggregation, Priority_Node *node)
 Updates the priority of the node in the aggregation. More...
 
static __inline__ void _Priority_Change_nothing (Priority_Aggregation *aggregation, bool prepend_it, Priority_Actions *actions, void *arg)
 Does nothing. More...
 
static __inline__ void _Priority_Remove_nothing (Priority_Aggregation *aggregation, Priority_Actions *actions, void *arg)
 Does nothing. More...
 
static __inline__ void _Priority_Non_empty_insert (Priority_Aggregation *aggregation, Priority_Node *node, Priority_Actions *actions, Priority_Change_handler change, void *arg)
 Inserts the node in a nonempty aggregation and handles change if the node is the new minimum. More...
 
static __inline__ void _Priority_Insert (Priority_Aggregation *aggregation, Priority_Node *node, Priority_Actions *actions, Priority_Add_handler add, Priority_Change_handler change, void *arg)
 
static __inline__ void _Priority_Extract (Priority_Aggregation *aggregation, Priority_Node *node, Priority_Actions *actions, Priority_Remove_handler remove, Priority_Change_handler change, void *arg)
 Extracts the node from the aggregation. More...
 
static __inline__ void _Priority_Extract_non_empty (Priority_Aggregation *aggregation, Priority_Node *node, Priority_Actions *actions, Priority_Change_handler change, void *arg)
 Extracts the node from the aggregation. More...
 
static __inline__ void _Priority_Changed (Priority_Aggregation *aggregation, Priority_Node *node, bool prepend_it, Priority_Actions *actions, Priority_Change_handler change, void *arg)
 Updates the priority of the node in the aggregation. More...
 
static __inline__ void _Priority_Replace (Priority_Aggregation *aggregation, Priority_Node *victim, Priority_Node *replacement)
 Replaces one node by another. More...
 

Variables

const unsigned char _Bitfield_Leading_zeros [256]
 

Detailed Description

Priority Handler.

This handler encapsulates functionality which is used to manage thread priorities. The actual priority of a thread is an aggregation of priority nodes. The thread priority aggregation for the home scheduler instance of a thread consists of at least one priority node, which is normally the real priority of the thread. The locking protocols (e.g. priority ceiling and priority inheritance), rate-monotonic period objects and the POSIX sporadic server add, change and remove priority nodes.

Macro Definition Documentation

◆ PRIORITY_DEFAULT_MAXIMUM

#define PRIORITY_DEFAULT_MAXIMUM   255

The default lowest (least important) thread priority value.

This value is CPU port dependent.

Definition at line 92 of file priority.h.

◆ PRIORITY_PSEUDO_ISR

#define PRIORITY_PSEUDO_ISR   PRIORITY_MINIMUM

The priority value of pseudo-ISR threads.

Examples are the MPCI and timer server threads.

Definition at line 82 of file priority.h.

Typedef Documentation

◆ Priority_Control

typedef uint64_t Priority_Control

The thread priority control.

Lower values represent higher priorities. So, a priority value of zero represents the highest priority thread. This value is reserved for internal threads and the priority ceiling protocol.

The format of the thread priority control depends on the context. A thread priority control may contain a user visible priority for API import/export. It may also contain a scheduler internal priority value. Values are translated via the scheduler map/unmap priority operations. The format of scheduler interal values depend on the particular scheduler implementation. It may for example encode a deadline in case of the EDF scheduler.

The thread priority control value contained in the scheduler node (Scheduler_Node::Priority::value) uses the least-significant bit to indicate if the thread should be appended or prepended to its priority group, see SCHEDULER_PRIORITY_APPEND().

Definition at line 70 of file priority.h.

Function Documentation

◆ _Bitfield_Find_first_bit()

RTEMS_INLINE_ROUTINE unsigned int _Bitfield_Find_first_bit ( unsigned int  value)

Returns the bit number of the first bit set in the specified value.

The correspondence between the bit number and actual bit position is CPU architecture dependent. The search for the first bit set may run from most to least significant bit or vice-versa.

Parameters
valueThe value to bit scan.
Returns
The bit number of the first bit set.
See also
_Priority_Bits_index() and _Priority_Mask().

Definition at line 58 of file prioritybitmapimpl.h.

◆ _Priority_Actions_add()

static __inline__ void _Priority_Actions_add ( Priority_Actions actions,
Priority_Aggregation aggregation 
)
static

Adds actions to the priority actions' actions.

Parameters
[in,out]actionsThe priority actions to add actions to.
[out]aggregationThe actions to add to actions.

Definition at line 135 of file priorityimpl.h.

◆ _Priority_Actions_initialize_empty()

static __inline__ void _Priority_Actions_initialize_empty ( Priority_Actions actions)
static

Initializes the priority actions empty.

Parameters
[out]actionsThe actions to be initialized empty.

Definition at line 44 of file priorityimpl.h.

◆ _Priority_Actions_initialize_one()

static __inline__ void _Priority_Actions_initialize_one ( Priority_Actions actions,
Priority_Aggregation aggregation,
Priority_Node node,
Priority_Action_type  type 
)
static

Initializes the priority actions with the given information.

Parameters
[out]actionsThe actions to be initialized.
aggregationThe aggregation for the actions to be initialized.
nodeThe action node for the actions to be initialized.
typeThe action type for the actions to be initialized.

Definition at line 59 of file priorityimpl.h.

◆ _Priority_Actions_is_empty()

static __inline__ bool _Priority_Actions_is_empty ( const Priority_Actions actions)
static

Checks if the priority actions is empty.

Parameters
actionsThe priority actions to check if it is empty.
Return values
trueThe priority actions actions is empty.
falseThe priority actions actions is empty.

Definition at line 83 of file priorityimpl.h.

◆ _Priority_Actions_is_valid()

static __inline__ bool _Priority_Actions_is_valid ( const Priority_Aggregation aggregation)
static

Checks if the priority actions is valid.

Parameters
aggregationThe aggregation of the priority action.
Return values
trueThe aggregation is valid.
falseThe aggregation is not valid.

Definition at line 98 of file priorityimpl.h.

◆ _Priority_Actions_move()

static __inline__ Priority_Aggregation* _Priority_Actions_move ( Priority_Actions actions)
static

Moves the priority actions' actions.

Parameters
[in,out]actionsThe priority actions to move the actions away from.
Returns
The former actions of actions that were moved.

Definition at line 117 of file priorityimpl.h.

◆ _Priority_bit_map_Add()

RTEMS_INLINE_ROUTINE void _Priority_bit_map_Add ( Priority_bit_map_Control bit_map,
Priority_bit_map_Information bit_map_info 
)

Adds Priority queue bit map information.

Priority Queue implemented by bit map.

Parameters
[out]bit_mapThe bit map to be altered by bit_map_info.
bit_map_infoThe information with which to alter bit_map.

Definition at line 162 of file prioritybitmapimpl.h.

◆ _Priority_bit_map_Get_highest()

RTEMS_INLINE_ROUTINE unsigned int _Priority_bit_map_Get_highest ( const Priority_bit_map_Control bit_map)

Gets highest portion of Priority queue bit map.

Parameters
bit_mapThe bitmap to get the highest portion from.
Returns
The highest portion of the bitmap.

Definition at line 196 of file prioritybitmapimpl.h.

◆ _Priority_bit_map_Initialize()

RTEMS_INLINE_ROUTINE void _Priority_bit_map_Initialize ( Priority_bit_map_Control bit_map)

Initializes a bit map.

Parameters
[out]bit_mapThe bit map to initialize.

Definition at line 147 of file prioritybitmapimpl.h.

◆ _Priority_bit_map_Initialize_information()

RTEMS_INLINE_ROUTINE void _Priority_bit_map_Initialize_information ( Priority_bit_map_Control bit_map,
Priority_bit_map_Information bit_map_info,
unsigned int  new_priority 
)

Initializes the bit map information.

Parameters
bit_mapThe bit map for the initialization of the bit map information.
[out]bit_map_infoThe bit map information to initialize.
new_priorityThe new priority for the initialization of the bit map information.

Definition at line 234 of file prioritybitmapimpl.h.

◆ _Priority_bit_map_Is_empty()

RTEMS_INLINE_ROUTINE bool _Priority_bit_map_Is_empty ( const Priority_bit_map_Control bit_map)

Checks if the Priority queue bit map is empty.

Parameters
bit_mapThe bit map of which to check if it is empty.
Return values
trueThe Priority queue bit map is empty
falseThe Priority queue bit map is not empty.

Definition at line 218 of file prioritybitmapimpl.h.

◆ _Priority_bit_map_Remove()

RTEMS_INLINE_ROUTINE void _Priority_bit_map_Remove ( Priority_bit_map_Control bit_map,
Priority_bit_map_Information bit_map_info 
)

Removes Priority queue bit map information.

Priority Queue implemented by bit map.

Parameters
[out]bit_mapThe bit map to be altered by bit_map_info.
bit_map_infoThe information with which to alter bit_map.

Definition at line 179 of file prioritybitmapimpl.h.

◆ _Priority_Bits_index()

RTEMS_INLINE_ROUTINE unsigned int _Priority_Bits_index ( unsigned int  bit_number)

Returns the bit index position for the specified major or minor bit number.

Parameters
bit_numberThe bit number for which we need an index.
Returns
The corresponding array index into the priority bit map.

Definition at line 107 of file prioritybitmapimpl.h.

◆ _Priority_Change_nothing()

static __inline__ void _Priority_Change_nothing ( Priority_Aggregation aggregation,
bool  prepend_it,
Priority_Actions actions,
void *  arg 
)
static

Does nothing.

This method does nothing.

Parameters
aggregationIs ignored by the method.
prepend_itIs ignored by the method.
actionsIs ignored by the method.
argIs ignored by the method.

Definition at line 488 of file priorityimpl.h.

◆ _Priority_Changed()

static __inline__ void _Priority_Changed ( Priority_Aggregation aggregation,
Priority_Node node,
bool  prepend_it,
Priority_Actions actions,
Priority_Change_handler  change,
void *  arg 
)
static

Updates the priority of the node in the aggregation.

This method handles the case that node was the minimal node in aggregation.

Parameters
[in,out]aggregationThe aggregation to change the node in.
nodeThe node that has a new priority and will be reinserted in the aggregation.
prepend_itIndicates whether change should prepend if the minimal priority is incorrectly set after the change.
actionsThe actions for the case that the minimal priority is incorrectly set after the change.
changeIs called if the minimal priority is incorrectly set after the change.
argThe arguments for change.

Definition at line 673 of file priorityimpl.h.

◆ _Priority_Extract()

static __inline__ void _Priority_Extract ( Priority_Aggregation aggregation,
Priority_Node node,
Priority_Actions actions,
Priority_Remove_handler  remove,
Priority_Change_handler  change,
void *  arg 
)
static

Extracts the node from the aggregation.

This method extracts the node from the aggregation and handles the cases that aggregation is empty after the extraction, or that node was the minimal node in aggregation by calling remove (if empty) or change (if node was the minimal node).

Parameters
[in,out]aggregationThe aggregation to extract the node from.
nodeThe node to extract from aggregation.
actionsThe actions for the cases that the aggregation is empty after the extraction, or the minimal node was extracted.
removeIs called in the case that the aggregation is empty after the extraction.
changeIs called in the case that the minimal node was extracted.
argThe arguments for remove and change.

Definition at line 599 of file priorityimpl.h.

◆ _Priority_Extract_non_empty()

static __inline__ void _Priority_Extract_non_empty ( Priority_Aggregation aggregation,
Priority_Node node,
Priority_Actions actions,
Priority_Change_handler  change,
void *  arg 
)
static

Extracts the node from the aggregation.

This method extracts the node from the aggregation and handles the case that node was the minimal node in aggregation by calling change (if node was the minimal node).

Parameters
[in,out]aggregationThe aggregation to extract the node from.
nodeThe node to extract from aggregation.
actionsThe actions for the case that the minimal node was extracted.
changeIs called in the case that the minimal node was extracted.
argThe arguments for change.

Definition at line 637 of file priorityimpl.h.

◆ _Priority_Get_minimum_node()

static __inline__ Priority_Node* _Priority_Get_minimum_node ( const Priority_Aggregation aggregation)
static

Gets the minimum node of the priority aggregation.

Parameters
aggregationThe priority aggregation to get the minimum node from.
Returns
The minimum node of aggregation

Definition at line 302 of file priorityimpl.h.

◆ _Priority_Get_next_action()

static __inline__ Priority_Aggregation* _Priority_Get_next_action ( const Priority_Aggregation aggregation)
static

Gets the next action of the priority aggregation.

Parameters
aggregationThe priority aggregation to get the next action of.
Return values
next_actionThe next action of aggregation if RTEMS_SMP is defined.
NULLRTEMS_SMP is not defined.

Definition at line 363 of file priorityimpl.h.

◆ _Priority_Get_priority()

static __inline__ Priority_Control _Priority_Get_priority ( const Priority_Aggregation aggregation)
static

Gets the priority aggregation's priority.

Parameters
aggregationThe priority aggregation to get the priority from.
Returns
The priority of aggregation.

Definition at line 270 of file priorityimpl.h.

◆ _Priority_Get_scheduler()

static __inline__ const Scheduler_Control* _Priority_Get_scheduler ( const Priority_Aggregation aggregation)
static

Gets the priority aggregation's scheduler.

Parameters
aggregationThe priority aggregation to get the scheduler from.
Returns
The scheduler of aggregation.

Definition at line 284 of file priorityimpl.h.

◆ _Priority_Initialize_empty()

static __inline__ void _Priority_Initialize_empty ( Priority_Aggregation aggregation)
static

Initializes the priority aggregation empty.

Parameters
[out]aggregationThe priority aggregaton to initialize empty.

Definition at line 211 of file priorityimpl.h.

◆ _Priority_Initialize_one()

static __inline__ void _Priority_Initialize_one ( Priority_Aggregation aggregation,
Priority_Node node 
)
static

Initializes the priority aggregation with the given information.

Parameters
[out]aggregationThe priority aggregaton to initialize.
nodeThe priority node to initialize aggregation with.

Definition at line 232 of file priorityimpl.h.

◆ _Priority_Insert()

static __inline__ void _Priority_Insert ( Priority_Aggregation aggregation,
Priority_Node node,
Priority_Actions actions,
Priority_Add_handler  add,
Priority_Change_handler  change,
void *  arg 
)
static
Parameters
[in,out]aggregationThe aggregation to insert the node in.
nodeThe node to be inserted. The node's priority is used as key.
actionsPriority actions for the case that the aggregation was empty before the insert or the node is the new minimum.
addIs called in the case that aggregation was empty before the insert.
changeIs called in the case that aggregation was nonempty before the insert and node is the new minimum of the aggregation.
argThe arguments for change.

Definition at line 565 of file priorityimpl.h.

◆ _Priority_Is_empty()

static __inline__ bool _Priority_Is_empty ( const Priority_Aggregation aggregation)
static

Checks if the priority aggregation is empty.

Parameters
aggregationThe priority aggregation that shall be verified if it is empty.
Return values
trueThe priority aggregation is empty.
falseThe priority aggregation is not empty.

Definition at line 256 of file priorityimpl.h.

◆ _Priority_Less()

static __inline__ bool _Priority_Less ( const void *  left,
const RBTree_Node right 
)
static

Compares two priorities.

Parameters
leftThe priority control on the left hand side of the comparison.
rightTHe RBTree_Node to get the priority for the comparison from.
Return values
trueThe priority on the left hand side of the comparison is smaller.
falseThe priority on the left hand side of the comparison is greater of equal.

Definition at line 384 of file priorityimpl.h.

◆ _Priority_Major()

RTEMS_INLINE_ROUTINE unsigned int _Priority_Major ( unsigned int  the_priority)

Returns the major portion of the_priority.

Parameters
the_priorityThe priority of which we want the major portion.
Returns
The major portion of the priority.

Definition at line 125 of file prioritybitmapimpl.h.

◆ _Priority_Mask()

RTEMS_INLINE_ROUTINE Priority_bit_map_Word _Priority_Mask ( unsigned int  bit_number)

Returns the priority bit mask for the specified major or minor bit number.

Parameters
bit_numberThe bit number for which we need a mask.
Returns
The priority bit mask.

Definition at line 88 of file prioritybitmapimpl.h.

◆ _Priority_Minor()

RTEMS_INLINE_ROUTINE unsigned int _Priority_Minor ( unsigned int  the_priority)

Returns the minor portion of the_priority.

Parameters
the_priorityThe priority of which we want the minor portion.
Returns
The minor portion of the priority.

Definition at line 137 of file prioritybitmapimpl.h.

◆ _Priority_Node_initialize()

static __inline__ void _Priority_Node_initialize ( Priority_Node node,
Priority_Control  priority 
)
static

Initializes the priority node to the given priority.

Parameters
[out]nodeThe priority node to be initialized.
priorityThe priority to initialize node to.

Definition at line 156 of file priorityimpl.h.

◆ _Priority_Node_is_active()

static __inline__ bool _Priority_Node_is_active ( const Priority_Node node)
static

Checks if the priority node is active.

Parameters
nodeThe priority node that shall be verified if it is active.
Return values
trueThe priority node is active.
falseThe priority node is inactive.

Definition at line 199 of file priorityimpl.h.

◆ _Priority_Node_set_inactive()

static __inline__ void _Priority_Node_set_inactive ( Priority_Node node)
static

Sets the priority node inactive.

Parameters
[in,out]nodeThe priority node to set inactive.

Definition at line 184 of file priorityimpl.h.

◆ _Priority_Node_set_priority()

static __inline__ void _Priority_Node_set_priority ( Priority_Node node,
Priority_Control  priority 
)
static

Sets the priority of the priority node to the given priority.

Parameters
[out]nodeThe priority node to set the priority of.
priorityThe new priority for node.

Definition at line 171 of file priorityimpl.h.

◆ _Priority_Non_empty_insert()

static __inline__ void _Priority_Non_empty_insert ( Priority_Aggregation aggregation,
Priority_Node node,
Priority_Actions actions,
Priority_Change_handler  change,
void *  arg 
)
static

Inserts the node in a nonempty aggregation and handles change if the node is the new minimum.

Parameters
[in,out]aggregationThe aggregation to insert the node into.
nodeThe node to be inserted. The node's priority is used as a key.
actionsParameter for change that is used if the node is the new minimum.
changeThe priority change handler that is called in the case that the new node is the minimum of the aggregation.
argArguments for change that is used if the node is the new minimum.

Definition at line 534 of file priorityimpl.h.

◆ _Priority_Plain_changed()

static __inline__ void _Priority_Plain_changed ( Priority_Aggregation aggregation,
Priority_Node node 
)
static

Updates the priority of the node in the aggregation.

It first extracts the node and inserts it again, with the new node priority as key. This method does not handle the case that node was the minimal node.

Parameters
[in,out]aggregationThe aggregation to change the node in.
nodeThe node that has a new priority and will be reinserted in the aggregation.

Definition at line 450 of file priorityimpl.h.

◆ _Priority_Plain_extract()

static __inline__ void _Priority_Plain_extract ( Priority_Aggregation aggregation,
Priority_Node node 
)
static

Extracts the priority node from the aggregation.

This method does not handle the case that node was the minimal node.

Parameters
[in,out]aggregationThe aggregation to extract the node from.
nodeThe node to be extracted.

Definition at line 433 of file priorityimpl.h.

◆ _Priority_Plain_insert()

static __inline__ bool _Priority_Plain_insert ( Priority_Aggregation aggregation,
Priority_Node node,
Priority_Control  priority 
)
static

Inserts the node with the given priority into the priority aggregation's contributors.

This method does not handle the case that node was the minimal node.

Parameters
[in,out]aggregationThe aggregation to insert the node in its contributors.
[in]nodeThe node to insert in the contributors.
priorityThe priority control for the inserted node.
Return values
trueThe inserted node with its priority is the minimum of the RBTree.
falseThe inserted node with its priority is not the minimum of the RBTree.

Definition at line 411 of file priorityimpl.h.

◆ _Priority_Remove_nothing()

static __inline__ void _Priority_Remove_nothing ( Priority_Aggregation aggregation,
Priority_Actions actions,
void *  arg 
)
static

Does nothing.

This method does nothing.

Parameters
aggregationIs ignored by the method.
actionsIs ignored by the method.
argIs ignored by the method.

Definition at line 510 of file priorityimpl.h.

◆ _Priority_Replace()

static __inline__ void _Priority_Replace ( Priority_Aggregation aggregation,
Priority_Node victim,
Priority_Node replacement 
)
static

Replaces one node by another.

The new node has the priority of the old node.

Parameters
[in,out]aggregationThe aggregation to replace victim by replacement in.
victimThe node that will be replaced.
[out]replacementThe node that replaces victim. It obtains its priority from victim.

Definition at line 704 of file priorityimpl.h.

◆ _Priority_Set_action()

static __inline__ void _Priority_Set_action ( Priority_Aggregation aggregation,
Priority_Node node,
Priority_Action_type  type 
)
static

Sets the action type and action node of the priority aggregation.

Parameters
[out]aggregationThe priority aggregation to set the action type and action node of.
nodeThe new action node for aggregation.
typeThe new action type for aggregation.

Definition at line 345 of file priorityimpl.h.

◆ _Priority_Set_action_node()

static __inline__ void _Priority_Set_action_node ( Priority_Aggregation aggregation,
Priority_Node node 
)
static

Sets the action node of the priority aggregation.

Parameters
[out]aggregationThe priority aggregation to set the action node of.
nodeThe new priority node for aggregation.

Definition at line 315 of file priorityimpl.h.

◆ _Priority_Set_action_type()

static __inline__ void _Priority_Set_action_type ( Priority_Aggregation aggregation,
Priority_Action_type  type 
)
static

Sets the action type of the priority aggregation.

Parameters
[out]aggregationThe priority aggregation to set the action type of.
typeThe new action type for aggregation.

Definition at line 329 of file priorityimpl.h.

Variable Documentation

◆ _Bitfield_Leading_zeros

const unsigned char _Bitfield_Leading_zeros[256]

This table is used by the generic bitfield routines to perform a highly optimized bit scan without the use of special CPU instructions.