RTEMS  5.1
priority.h
Go to the documentation of this file.
1 
9 /*
10  * COPYRIGHT (c) 1989-2011.
11  * On-Line Applications Research Corporation (OAR).
12  *
13  * Copyright (c) 2016, 2017 embedded brains GmbH.
14  *
15  * The license and distribution terms for this file may be
16  * found in the file LICENSE in this distribution or at
17  * http://www.rtems.org/license/LICENSE.
18  */
19 
20 #ifndef _RTEMS_SCORE_PRIORITY_H
21 #define _RTEMS_SCORE_PRIORITY_H
22 
23 #include <rtems/score/chain.h>
24 #include <rtems/score/cpu.h>
25 #include <rtems/score/rbtree.h>
26 
27 struct _Scheduler_Control;
28 
29 #ifdef __cplusplus
30 extern "C" {
31 #endif
32 
70 typedef uint64_t Priority_Control;
71 
75 #define PRIORITY_MINIMUM 0
76 
82 #define PRIORITY_PSEUDO_ISR PRIORITY_MINIMUM
83 
89 #if defined (CPU_PRIORITY_MAXIMUM)
90  #define PRIORITY_DEFAULT_MAXIMUM CPU_PRIORITY_MAXIMUM
91 #else
92  #define PRIORITY_DEFAULT_MAXIMUM 255
93 #endif
94 
98 typedef struct {
102  union {
103  Chain_Node Chain;
104  RBTree_Node RBTree;
105  } Node;
106 
111 } Priority_Node;
112 
116 typedef enum {
117  PRIORITY_ACTION_ADD,
118  PRIORITY_ACTION_CHANGE,
119  PRIORITY_ACTION_REMOVE,
120  PRIORITY_ACTION_INVALID
122 
124 
148 
153  RBTree_Control Contributors;
154 
155 #if defined(RTEMS_SMP)
156 
159  const struct _Scheduler_Control *scheduler;
160 #endif
161 
166  struct {
167 #if defined(RTEMS_SMP)
168 
171  Priority_Aggregation *next;
172 #endif
173 
178 
183  } Action;
184 };
185 
193 typedef struct {
199 
200 #ifdef __cplusplus
201 }
202 #endif
203 
206 #endif
207 /* end of include file */
The priority aggregation.
Definition: priority.h:133
Definition: chain.h:68
uint64_t Priority_Control
The thread priority control.
Definition: priority.h:70
The priority node to build up a priority aggregation.
Definition: priority.h:98
A list of priority actions.
Definition: priority.h:193
Priority_Control priority
The priority value of this node.
Definition: priority.h:110
Red-black tree node.
Definition: rbtree.h:55
Priority_Action_type type
The type of the action.
Definition: priority.h:182
RBTree_Control Contributors
A red-black tree to contain priority nodes contributing to the overall priority of this priority aggr...
Definition: priority.h:153
struct Priority_Aggregation::@3979 Action
A priority action block to manage priority node additions, changes and removals.
Constants and Structures Associated with the Red-Black Tree Handler.
Priority_Node Node
This priority node reflects the overall priority of the aggregation.
Definition: priority.h:147
Chain Handler API.
Scheduler control.
Definition: scheduler.h:269
Priority_Node * node
The priority node of the action.
Definition: priority.h:177
Priority_Action_type
The priority action type.
Definition: priority.h:116
Priority_Aggregation * actions
The first action of a priority action list.
Definition: priority.h:197