![]() |
RTEMS 6.1-rc7
|
This group contains the Priority Handler implementation. More...
Files | |
file | priority.h |
This header file provides interfaces of the Priority Handler which are used by the implementation and the Application Configuration. | |
file | priorityimpl.h |
This header file provides interfaces of the Priority Handler which are only used by the 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_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, Priority_Group_order group_order, 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. | |
enum | Priority_Group_order { PRIORITY_GROUP_FIRST = 0 , PRIORITY_GROUP_LAST = 1 } |
The priority group order determines if a priority node is inserted as the first or last node into its priority group. More... | |
Variables | |
const unsigned char | _Bitfield_Leading_zeros [256] |
This group contains the Priority Handler implementation.
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.
#define PRIORITY_DEFAULT_MAXIMUM 255 |
The default lowest (least important) thread priority value.
This value is CPU port dependent.
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().
enum Priority_Group_order |
The priority group order determines if a priority node is inserted as the first or last node into its priority group.
The values of the enumerators matter. The least significant bit of a Priority_Control value is not used for the actual priority of a node. During insertion the least significant bit is used to determine the ordering within a priority group based on the enumerator values.
|
extern |
This table is used by the generic bitfield routines to perform a highly optimized bit scan without the use of special CPU instructions.