RTEMS  5.1
Files | Data Structures | 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.
 

Data Structures

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...
 
RTEMS_INLINE_ROUTINE void _Priority_Actions_initialize_empty (Priority_Actions *actions)
 Initializes the priority actions empty. More...
 
RTEMS_INLINE_ROUTINE 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...
 
RTEMS_INLINE_ROUTINE bool _Priority_Actions_is_empty (const Priority_Actions *actions)
 Checks if the priority actions is empty. More...
 
RTEMS_INLINE_ROUTINE bool _Priority_Actions_is_valid (const Priority_Aggregation *aggregation)
 Checks if the priority actions is valid. More...
 
RTEMS_INLINE_ROUTINE Priority_Aggregation_Priority_Actions_move (Priority_Actions *actions)
 Moves the priority actions' actions. More...
 
RTEMS_INLINE_ROUTINE void _Priority_Actions_add (Priority_Actions *actions, Priority_Aggregation *aggregation)
 Adds actions to the priority actions' actions. More...
 
RTEMS_INLINE_ROUTINE void _Priority_Node_initialize (Priority_Node *node, Priority_Control priority)
 Initializes the priority node to the given priority. More...
 
RTEMS_INLINE_ROUTINE void _Priority_Node_set_priority (Priority_Node *node, Priority_Control priority)
 Sets the priority of the priority node to the given priority. More...
 
RTEMS_INLINE_ROUTINE void _Priority_Node_set_inactive (Priority_Node *node)
 Sets the priority node inactive. More...
 
RTEMS_INLINE_ROUTINE bool _Priority_Node_is_active (const Priority_Node *node)
 Checks if the priority node is active. More...
 
RTEMS_INLINE_ROUTINE void _Priority_Initialize_empty (Priority_Aggregation *aggregation)
 Initializes the priority aggregation empty. More...
 
RTEMS_INLINE_ROUTINE void _Priority_Initialize_one (Priority_Aggregation *aggregation, Priority_Node *node)
 Initializes the priority aggregation with the given information. More...
 
RTEMS_INLINE_ROUTINE bool _Priority_Is_empty (const Priority_Aggregation *aggregation)
 Checks if the priority aggregation is empty. More...
 
RTEMS_INLINE_ROUTINE Priority_Control _Priority_Get_priority (const Priority_Aggregation *aggregation)
 Gets the priority aggregation's priority. More...
 
RTEMS_INLINE_ROUTINE const Scheduler_Control_Priority_Get_scheduler (const Priority_Aggregation *aggregation)
 Gets the priority aggregation's scheduler. More...
 
RTEMS_INLINE_ROUTINE Priority_Node_Priority_Get_minimum_node (const Priority_Aggregation *aggregation)
 Gets the minimum node of the priority aggregation. More...
 
RTEMS_INLINE_ROUTINE void _Priority_Set_action_node (Priority_Aggregation *aggregation, Priority_Node *node)
 Sets the action node of the priority aggregation. More...
 
RTEMS_INLINE_ROUTINE void _Priority_Set_action_type (Priority_Aggregation *aggregation, Priority_Action_type type)
 Sets the action type of the priority aggregation. More...
 
RTEMS_INLINE_ROUTINE 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...
 
RTEMS_INLINE_ROUTINE Priority_Aggregation_Priority_Get_next_action (const Priority_Aggregation *aggregation)
 Gets the next action of the priority aggregation. More...
 
RTEMS_INLINE_ROUTINE bool _Priority_Less (const void *left, const RBTree_Node *right)
 Compares two priorities. More...
 
RTEMS_INLINE_ROUTINE 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...
 
RTEMS_INLINE_ROUTINE void _Priority_Plain_extract (Priority_Aggregation *aggregation, Priority_Node *node)
 Extracts the priority node from the aggregation. More...
 
RTEMS_INLINE_ROUTINE void _Priority_Plain_changed (Priority_Aggregation *aggregation, Priority_Node *node)
 Updates the priority of the node in the aggregation. More...
 
RTEMS_INLINE_ROUTINE void _Priority_Change_nothing (Priority_Aggregation *aggregation, bool prepend_it, Priority_Actions *actions, void *arg)
 Does nothing. More...
 
RTEMS_INLINE_ROUTINE void _Priority_Remove_nothing (Priority_Aggregation *aggregation, Priority_Actions *actions, void *arg)
 Does nothing. More...
 
RTEMS_INLINE_ROUTINE 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...
 
RTEMS_INLINE_ROUTINE void _Priority_Insert (Priority_Aggregation *aggregation, Priority_Node *node, Priority_Actions *actions, Priority_Add_handler add, Priority_Change_handler change, void *arg)
 
RTEMS_INLINE_ROUTINE 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...
 
RTEMS_INLINE_ROUTINE 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...
 
RTEMS_INLINE_ROUTINE 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...
 
RTEMS_INLINE_ROUTINE 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.

◆ PRIORITY_PSEUDO_ISR

#define PRIORITY_PSEUDO_ISR   PRIORITY_MINIMUM

The priority value of pseudo-ISR threads.

Examples are the MPCI and timer server threads.

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().

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().

◆ _Priority_Actions_add()

RTEMS_INLINE_ROUTINE void _Priority_Actions_add ( Priority_Actions actions,
Priority_Aggregation aggregation 
)

Adds actions to the priority actions' actions.

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

◆ _Priority_Actions_initialize_empty()

RTEMS_INLINE_ROUTINE void _Priority_Actions_initialize_empty ( Priority_Actions actions)

Initializes the priority actions empty.

Parameters
[out]actionsThe actions to be initialized empty.

◆ _Priority_Actions_initialize_one()

RTEMS_INLINE_ROUTINE 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.

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.

◆ _Priority_Actions_is_empty()

RTEMS_INLINE_ROUTINE bool _Priority_Actions_is_empty ( const Priority_Actions actions)

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.

◆ _Priority_Actions_is_valid()

RTEMS_INLINE_ROUTINE bool _Priority_Actions_is_valid ( const Priority_Aggregation aggregation)

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.

◆ _Priority_Actions_move()

RTEMS_INLINE_ROUTINE Priority_Aggregation* _Priority_Actions_move ( Priority_Actions actions)

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.

◆ _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.

◆ _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.

◆ _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.

◆ _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.

◆ _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.

◆ _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.

◆ _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.

◆ _Priority_Change_nothing()

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

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.

◆ _Priority_Changed()

RTEMS_INLINE_ROUTINE 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.

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.

◆ _Priority_Extract()

RTEMS_INLINE_ROUTINE 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.

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.

◆ _Priority_Extract_non_empty()

RTEMS_INLINE_ROUTINE 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.

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.

◆ _Priority_Get_minimum_node()

RTEMS_INLINE_ROUTINE Priority_Node* _Priority_Get_minimum_node ( const Priority_Aggregation aggregation)

Gets the minimum node of the priority aggregation.

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

◆ _Priority_Get_next_action()

RTEMS_INLINE_ROUTINE Priority_Aggregation* _Priority_Get_next_action ( const Priority_Aggregation aggregation)

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.

◆ _Priority_Get_priority()

RTEMS_INLINE_ROUTINE Priority_Control _Priority_Get_priority ( const Priority_Aggregation aggregation)

Gets the priority aggregation's priority.

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

◆ _Priority_Get_scheduler()

RTEMS_INLINE_ROUTINE const Scheduler_Control* _Priority_Get_scheduler ( const Priority_Aggregation aggregation)

Gets the priority aggregation's scheduler.

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

◆ _Priority_Initialize_empty()

RTEMS_INLINE_ROUTINE void _Priority_Initialize_empty ( Priority_Aggregation aggregation)

Initializes the priority aggregation empty.

Parameters
[out]aggregationThe priority aggregaton to initialize empty.

◆ _Priority_Initialize_one()

RTEMS_INLINE_ROUTINE void _Priority_Initialize_one ( Priority_Aggregation aggregation,
Priority_Node node 
)

Initializes the priority aggregation with the given information.

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

◆ _Priority_Insert()

RTEMS_INLINE_ROUTINE void _Priority_Insert ( Priority_Aggregation aggregation,
Priority_Node node,
Priority_Actions actions,
Priority_Add_handler  add,
Priority_Change_handler  change,
void *  arg 
)
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.

◆ _Priority_Is_empty()

RTEMS_INLINE_ROUTINE bool _Priority_Is_empty ( const Priority_Aggregation aggregation)

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.

◆ _Priority_Less()

RTEMS_INLINE_ROUTINE bool _Priority_Less ( const void *  left,
const RBTree_Node right 
)

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.

◆ _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.

◆ _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.

◆ _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.

◆ _Priority_Node_initialize()

RTEMS_INLINE_ROUTINE void _Priority_Node_initialize ( Priority_Node node,
Priority_Control  priority 
)

Initializes the priority node to the given priority.

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

◆ _Priority_Node_is_active()

RTEMS_INLINE_ROUTINE bool _Priority_Node_is_active ( const Priority_Node node)

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.

◆ _Priority_Node_set_inactive()

RTEMS_INLINE_ROUTINE void _Priority_Node_set_inactive ( Priority_Node node)

Sets the priority node inactive.

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

◆ _Priority_Node_set_priority()

RTEMS_INLINE_ROUTINE void _Priority_Node_set_priority ( Priority_Node node,
Priority_Control  priority 
)

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.

◆ _Priority_Non_empty_insert()

RTEMS_INLINE_ROUTINE 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.

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.

◆ _Priority_Plain_changed()

RTEMS_INLINE_ROUTINE void _Priority_Plain_changed ( Priority_Aggregation aggregation,
Priority_Node node 
)

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.

◆ _Priority_Plain_extract()

RTEMS_INLINE_ROUTINE void _Priority_Plain_extract ( Priority_Aggregation aggregation,
Priority_Node node 
)

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.

◆ _Priority_Plain_insert()

RTEMS_INLINE_ROUTINE 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.

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.

◆ _Priority_Remove_nothing()

RTEMS_INLINE_ROUTINE void _Priority_Remove_nothing ( Priority_Aggregation aggregation,
Priority_Actions actions,
void *  arg 
)

Does nothing.

This method does nothing.

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

◆ _Priority_Replace()

RTEMS_INLINE_ROUTINE void _Priority_Replace ( Priority_Aggregation aggregation,
Priority_Node victim,
Priority_Node replacement 
)

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.

◆ _Priority_Set_action()

RTEMS_INLINE_ROUTINE 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.

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.

◆ _Priority_Set_action_node()

RTEMS_INLINE_ROUTINE void _Priority_Set_action_node ( Priority_Aggregation aggregation,
Priority_Node node 
)

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.

◆ _Priority_Set_action_type()

RTEMS_INLINE_ROUTINE void _Priority_Set_action_type ( Priority_Aggregation aggregation,
Priority_Action_type  type 
)

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.

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.