RTEMS: Priority Handler

| RTEMS 5.4-rc2

Loading...
Searching...
No Matches
Files | Data Structures | Macros | Typedefs | Enumerations | Functions | Variables
Priority Handler
Internal » SuperCore

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.
#define | PRIORITY_DEFAULT_MAXIMUM 255
| The default lowest (least important) thread priority value.

## Typedefs
typedef uint64_t | Priority_Control
| The thread priority control.
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.
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.
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.
RTEMS_INLINE_ROUTINE unsigned int | _Priority_Major (unsigned int the_priority)
| Returns the major portion of the_priority.
RTEMS_INLINE_ROUTINE unsigned int | _Priority_Minor (unsigned int the_priority)
| Returns the minor portion of the_priority.
RTEMS_INLINE_ROUTINE void | _Priority_bit_map_Initialize (Priority_bit_map_Control *bit_map)
| Initializes a bit map.
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.
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.
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.
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.
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.
RTEMS_INLINE_ROUTINE void | _Priority_Actions_initialize_empty (Priority_Actions *actions)
| Initializes the priority actions empty.
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.
RTEMS_INLINE_ROUTINE bool | _Priority_Actions_is_empty (const Priority_Actions *actions)
| Checks if the priority actions is empty.
RTEMS_INLINE_ROUTINE bool | _Priority_Actions_is_valid (const Priority_Aggregation *aggregation)
| Checks if the priority actions is valid.
RTEMS_INLINE_ROUTINE Priority_Aggregation * | _Priority_Actions_move (Priority_Actions *actions)
| Moves the priority actions' actions.
RTEMS_INLINE_ROUTINE void | _Priority_Actions_add (Priority_Actions *actions, Priority_Aggregation *aggregation)
| Adds actions to the priority actions' actions.
RTEMS_INLINE_ROUTINE void | _Priority_Node_initialize (Priority_Node *node, Priority_Control priority)
| Initializes the priority node to the given 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.
RTEMS_INLINE_ROUTINE void | _Priority_Node_set_inactive (Priority_Node *node)
| Sets the priority node inactive.
RTEMS_INLINE_ROUTINE bool | _Priority_Node_is_active (const Priority_Node *node)
| Checks if the priority node is active.
RTEMS_INLINE_ROUTINE void | _Priority_Initialize_empty (Priority_Aggregation *aggregation)
| Initializes the priority aggregation empty.
RTEMS_INLINE_ROUTINE void | _Priority_Initialize_one (Priority_Aggregation *aggregation, Priority_Node *node)
| Initializes the priority aggregation with the given information.
RTEMS_INLINE_ROUTINE bool | _Priority_Is_empty (const Priority_Aggregation *aggregation)
| Checks if the priority aggregation is empty.
RTEMS_INLINE_ROUTINE Priority_Control | _Priority_Get_priority (const Priority_Aggregation *aggregation)
| Gets the priority aggregation's priority.
RTEMS_INLINE_ROUTINE const Scheduler_Control * | _Priority_Get_scheduler (const Priority_Aggregation *aggregation)
| Gets the priority aggregation's scheduler.
RTEMS_INLINE_ROUTINE Priority_Node * | _Priority_Get_minimum_node (const Priority_Aggregation *aggregation)
| Gets the minimum node of the priority aggregation.
RTEMS_INLINE_ROUTINE void | _Priority_Set_action_node (Priority_Aggregation *aggregation, Priority_Node *node)
| Sets the action node of the priority aggregation.
RTEMS_INLINE_ROUTINE void | _Priority_Set_action_type (Priority_Aggregation *aggregation, Priority_Action_type type)
| Sets the action type of the priority aggregation.
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.
RTEMS_INLINE_ROUTINE Priority_Aggregation * | _Priority_Get_next_action (const Priority_Aggregation *aggregation)
| Gets the next action of the priority aggregation.
RTEMS_INLINE_ROUTINE bool | _Priority_Less (const void *left, const RBTree_Node *right)
| Compares two priorities.
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.
RTEMS_INLINE_ROUTINE void | _Priority_Plain_extract (Priority_Aggregation *aggregation, Priority_Node *node)
| Extracts the priority node from the aggregation.
RTEMS_INLINE_ROUTINE void | _Priority_Plain_changed (Priority_Aggregation *aggregation, Priority_Node *node)
| Updates the priority of the node in the aggregation.
RTEMS_INLINE_ROUTINE void | _Priority_Change_nothing (Priority_Aggregation *aggregation, bool prepend_it, Priority_Actions *actions, void *arg)
| Does nothing.
RTEMS_INLINE_ROUTINE void | _Priority_Remove_nothing (Priority_Aggregation *aggregation, Priority_Actions *actions, void *arg)
| Does nothing.
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.
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.
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.
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.
RTEMS_INLINE_ROUTINE void | _Priority_Replace (Priority_Aggregation *aggregation, Priority_Node *victim, Priority_Node *replacement)
| Replaces one node by another.

## 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

  value | The 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] | actions | The priority actions to add actions to.
  [out] | aggregation | The 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] | actions | The 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] | actions | The actions to be initialized.
  | aggregation | The aggregation for the actions to be initialized.
  | node | The action node for the actions to be initialized.
  | type | The 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

  actions | The priority actions to check if it is empty.

Return values

  true | The priority actions actions is empty.
  false | The 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

  aggregation | The aggregation of the priority action.

Return values

  true | The aggregation is valid.
  false | The 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] | actions | The 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_map | The bit map to be altered by bit_map_info.
  | bit_map_info | The 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_map | The 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_map | The 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_map | The bit map for the initialization of the bit map information.
  [out] | bit_map_info | The bit map information to initialize.
  | new_priority | The 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_map | The bit map of which to check if it is empty.

Return values

  true | The Priority queue bit map is empty
  false | The 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_map | The bit map to be altered by bit_map_info.
  | bit_map_info | The 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_number | The 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

  aggregation | Is ignored by the method.
  prepend_it | Is ignored by the method.
  actions | Is ignored by the method.
  arg | Is 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] | aggregation | The aggregation to change the node in.
  | node | The node that has a new priority and will be reinserted in the aggregation.
  | prepend_it | Indicates whether change should prepend if the minimal priority is incorrectly set after the change.
  | actions | The actions for the case that the minimal priority is incorrectly set after the change.
  | change | Is called if the minimal priority is incorrectly set after the change.
  | arg | The 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] | aggregation | The aggregation to extract the node from.
  | node | The node to extract from aggregation.
  | actions | The actions for the cases that the aggregation is empty after the extraction, or the minimal node was extracted.
  | remove | Is called in the case that the aggregation is empty after the extraction.
  | change | Is called in the case that the minimal node was extracted.
  | arg | The 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] | aggregation | The aggregation to extract the node from.
  | node | The node to extract from aggregation.
  | actions | The actions for the case that the minimal node was extracted.
  | change | Is called in the case that the minimal node was extracted.
  | arg | The 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

  aggregation | The 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

  aggregation | The priority aggregation to get the next action of.

Return values

  next_action | The next action of aggregation if RTEMS_SMP is defined.
  NULL | RTEMS_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

  aggregation | The 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

  aggregation | The 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] | aggregation | The 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] | aggregation | The priority aggregaton to initialize.
  | node | The 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] | aggregation | The aggregation to insert the node in.
  | node | The node to be inserted. The node's priority is used as key.
  | actions | Priority actions for the case that the aggregation was empty before the insert or the node is the new minimum.
  | add | Is called in the case that aggregation was empty before the insert.
  | change | Is called in the case that aggregation was nonempty before the insert and node is the new minimum of the aggregation.
  | arg | The 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

  aggregation | The priority aggregation that shall be verified if it is empty.

Return values

  true | The priority aggregation is empty.
  false | The priority aggregation is not empty.

## ◆ _Priority_Less()

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

Compares two priorities.

Parameters

  left | The priority control on the left hand side of the comparison.
  right | THe RBTree_Node to get the priority for the comparison from.

Return values

  true | The priority on the left hand side of the comparison is smaller.
  false | The 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_priority | The 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_number | The 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_priority | The 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] | node | The priority node to be initialized.
  | priority | The 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

  node | The priority node that shall be verified if it is active.

Return values

  true | The priority node is active.
  false | The 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] | node | The 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] | node | The priority node to set the priority of.
  | priority | The 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] | aggregation | The aggregation to insert the node into.
  | node | The node to be inserted. The node's priority is used as a key.
  | actions | Parameter for change that is used if the node is the new minimum.
  | change | The priority change handler that is called in the case that the new node is the minimum of the aggregation.
  | arg | Arguments 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] | aggregation | The aggregation to change the node in.
  | node | The 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] | aggregation | The aggregation to extract the node from.
  | node | The 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] | aggregation | The aggregation to insert the node in its contributors.
  [in] | node | The node to insert in the contributors.
  | priority | The priority control for the inserted node.

Return values

  true | The inserted node with its priority is the minimum of the RBTree.
  false | The 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

  aggregation | Is ignored by the method.
  actions | Is ignored by the method.
  arg | Is 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] | aggregation | The aggregation to replace victim by replacement in.
  | victim | The node that will be replaced.
  [out] | replacement | The 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] | aggregation | The priority aggregation to set the action type and action node of.
  | node | The new action node for aggregation.
  | type | The 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] | aggregation | The priority aggregation to set the action node of.
  | node | The 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] | aggregation | The priority aggregation to set the action type of.
  | type | The new action type for aggregation.

## Variable Documentation

## ◆ _Bitfield_Leading_zeros

const unsigned char _Bitfield_Leading_zeros[256]
| extern

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