36 #ifndef _RTEMS_CONFDEFS_SCHEDULER_H 37 #define _RTEMS_CONFDEFS_SCHEDULER_H 39 #ifndef __CONFIGURATION_TEMPLATE_h 40 #error "Do not include this file directly, use <rtems/confdefs.h> instead" 47 #if !defined(CONFIGURE_SCHEDULER_CBS) \ 48 && !defined(CONFIGURE_SCHEDULER_EDF) \ 49 && !defined(CONFIGURE_SCHEDULER_EDF_SMP) \ 50 && !defined(CONFIGURE_SCHEDULER_PRIORITY) \ 51 && !defined(CONFIGURE_SCHEDULER_PRIORITY_AFFINITY_SMP) \ 52 && !defined(CONFIGURE_SCHEDULER_PRIORITY_SMP) \ 53 && !defined(CONFIGURE_SCHEDULER_SIMPLE) \ 54 && !defined(CONFIGURE_SCHEDULER_SIMPLE_SMP) \ 55 && !defined(CONFIGURE_SCHEDULER_STRONG_APA) \ 56 && !defined(CONFIGURE_SCHEDULER_USER) 57 #if defined(RTEMS_SMP) && _CONFIGURE_MAXIMUM_PROCESSORS > 1 58 #define CONFIGURE_SCHEDULER_EDF_SMP 60 #define CONFIGURE_SCHEDULER_PRIORITY 70 #ifndef CONFIGURE_MAXIMUM_PRIORITY 71 #define CONFIGURE_MAXIMUM_PRIORITY PRIORITY_DEFAULT_MAXIMUM 74 #if CONFIGURE_MAXIMUM_PRIORITY != 3 \ 75 && CONFIGURE_MAXIMUM_PRIORITY != 7 \ 76 && CONFIGURE_MAXIMUM_PRIORITY != 15 \ 77 && CONFIGURE_MAXIMUM_PRIORITY != 31 \ 78 && CONFIGURE_MAXIMUM_PRIORITY != 63 \ 79 && CONFIGURE_MAXIMUM_PRIORITY != 127 \ 80 && CONFIGURE_MAXIMUM_PRIORITY != 255 81 #error "CONFIGURE_MAXIMUM_PRIORITY must be one of 3, 7, 15, 31, 63, 127, and 255" 84 #if CONFIGURE_MAXIMUM_PRIORITY > PRIORITY_DEFAULT_MAXIMUM 85 #error "CONFIGURE_SCHEDULER_PRIORITY must be less than or equal to the architecture defined maximum priority" 88 #ifdef CONFIGURE_SCHEDULER_PRIORITY 89 #ifndef CONFIGURE_SCHEDULER_NAME 90 #define CONFIGURE_SCHEDULER_NAME rtems_build_name( 'U', 'P', 'D', ' ' ) 93 #ifndef CONFIGURE_SCHEDULER_TABLE_ENTRIES 94 #define CONFIGURE_SCHEDULER \ 95 RTEMS_SCHEDULER_PRIORITY( \ 97 CONFIGURE_MAXIMUM_PRIORITY + 1 \ 100 #define CONFIGURE_SCHEDULER_TABLE_ENTRIES \ 101 RTEMS_SCHEDULER_TABLE_PRIORITY( dflt, CONFIGURE_SCHEDULER_NAME ) 105 #ifdef CONFIGURE_SCHEDULER_PRIORITY_SMP 106 #ifndef CONFIGURE_SCHEDULER_NAME 107 #define CONFIGURE_SCHEDULER_NAME rtems_build_name( 'M', 'P', 'D', ' ' ) 110 #ifndef CONFIGURE_SCHEDULER_TABLE_ENTRIES 111 #define CONFIGURE_SCHEDULER \ 112 RTEMS_SCHEDULER_PRIORITY_SMP( \ 114 CONFIGURE_MAXIMUM_PRIORITY + 1 \ 117 #define CONFIGURE_SCHEDULER_TABLE_ENTRIES \ 118 RTEMS_SCHEDULER_TABLE_PRIORITY_SMP( dflt, CONFIGURE_SCHEDULER_NAME ) 122 #ifdef CONFIGURE_SCHEDULER_PRIORITY_AFFINITY_SMP 123 #ifndef CONFIGURE_SCHEDULER_NAME 124 #define CONFIGURE_SCHEDULER_NAME rtems_build_name( 'M', 'P', 'A', ' ' ) 127 #ifndef CONFIGURE_SCHEDULER_TABLE_ENTRIES 128 #define CONFIGURE_SCHEDULER \ 129 RTEMS_SCHEDULER_PRIORITY_AFFINITY_SMP( \ 131 CONFIGURE_MAXIMUM_PRIORITY + 1 \ 134 #define CONFIGURE_SCHEDULER_TABLE_ENTRIES \ 135 RTEMS_SCHEDULER_TABLE_PRIORITY_AFFINITY_SMP( \ 137 CONFIGURE_SCHEDULER_NAME \ 142 #ifdef CONFIGURE_SCHEDULER_STRONG_APA 143 #ifndef CONFIGURE_SCHEDULER_NAME 144 #define CONFIGURE_SCHEDULER_NAME rtems_build_name( 'M', 'A', 'P', 'A' ) 147 #ifndef CONFIGURE_SCHEDULER_TABLE_ENTRIES 148 #define CONFIGURE_SCHEDULER \ 149 RTEMS_SCHEDULER_STRONG_APA( \ 151 CONFIGURE_MAXIMUM_PRIORITY + 1 \ 154 #define CONFIGURE_SCHEDULER_TABLE_ENTRIES \ 155 RTEMS_SCHEDULER_TABLE_STRONG_APA( dflt, CONFIGURE_SCHEDULER_NAME ) 159 #ifdef CONFIGURE_SCHEDULER_SIMPLE 160 #ifndef CONFIGURE_SCHEDULER_NAME 161 #define CONFIGURE_SCHEDULER_NAME rtems_build_name( 'U', 'P', 'S', ' ' ) 164 #ifndef CONFIGURE_SCHEDULER_TABLE_ENTRIES 165 #define CONFIGURE_SCHEDULER RTEMS_SCHEDULER_SIMPLE( dflt ) 167 #define CONFIGURE_SCHEDULER_TABLE_ENTRIES \ 168 RTEMS_SCHEDULER_TABLE_SIMPLE( dflt, CONFIGURE_SCHEDULER_NAME ) 172 #ifdef CONFIGURE_SCHEDULER_SIMPLE_SMP 173 #ifndef CONFIGURE_SCHEDULER_NAME 174 #define CONFIGURE_SCHEDULER_NAME rtems_build_name( 'M', 'P', 'S', ' ' ) 177 #ifndef CONFIGURE_SCHEDULER_TABLE_ENTRIES 178 #define CONFIGURE_SCHEDULER \ 179 RTEMS_SCHEDULER_SIMPLE_SMP( dflt ) 181 #define CONFIGURE_SCHEDULER_TABLE_ENTRIES \ 182 RTEMS_SCHEDULER_TABLE_SIMPLE_SMP( dflt, CONFIGURE_SCHEDULER_NAME ) 186 #ifdef CONFIGURE_SCHEDULER_EDF 187 #ifndef CONFIGURE_SCHEDULER_NAME 188 #define CONFIGURE_SCHEDULER_NAME rtems_build_name( 'U', 'E', 'D', 'F' ) 191 #ifndef CONFIGURE_SCHEDULER_TABLE_ENTRIES 192 #define CONFIGURE_SCHEDULER RTEMS_SCHEDULER_EDF( dflt ) 194 #define CONFIGURE_SCHEDULER_TABLE_ENTRIES \ 195 RTEMS_SCHEDULER_TABLE_EDF( dflt, CONFIGURE_SCHEDULER_NAME ) 199 #ifdef CONFIGURE_SCHEDULER_EDF_SMP 200 #ifndef CONFIGURE_SCHEDULER_NAME 201 #define CONFIGURE_SCHEDULER_NAME rtems_build_name( 'M', 'E', 'D', 'F' ) 204 #ifndef CONFIGURE_SCHEDULER_TABLE_ENTRIES 205 #define CONFIGURE_SCHEDULER RTEMS_SCHEDULER_EDF_SMP( dflt ) 207 #define CONFIGURE_SCHEDULER_TABLE_ENTRIES \ 208 RTEMS_SCHEDULER_TABLE_EDF_SMP( dflt, CONFIGURE_SCHEDULER_NAME ) 212 #ifdef CONFIGURE_SCHEDULER_CBS 213 #ifndef CONFIGURE_SCHEDULER_NAME 214 #define CONFIGURE_SCHEDULER_NAME rtems_build_name( 'U', 'C', 'B', 'S' ) 217 #ifndef CONFIGURE_SCHEDULER_TABLE_ENTRIES 218 #define CONFIGURE_SCHEDULER RTEMS_SCHEDULER_CBS( dflt ) 220 #define CONFIGURE_SCHEDULER_TABLE_ENTRIES \ 221 RTEMS_SCHEDULER_TABLE_CBS( dflt, CONFIGURE_SCHEDULER_NAME ) 224 #ifndef CONFIGURE_CBS_MAXIMUM_SERVERS 225 #define CONFIGURE_CBS_MAXIMUM_SERVERS CONFIGURE_MAXIMUM_TASKS 229 CONFIGURE_CBS_MAXIMUM_SERVERS;
235 #ifdef CONFIGURE_SCHEDULER 240 CONFIGURE_SCHEDULER_TABLE_ENTRIES
243 #define _CONFIGURE_SCHEDULER_COUNT RTEMS_ARRAY_SIZE( _Scheduler_Table ) 249 const Scheduler_Assignment _Scheduler_Initial_assignments[] = {
250 #ifdef CONFIGURE_SCHEDULER_ASSIGNMENTS 251 CONFIGURE_SCHEDULER_ASSIGNMENTS
253 #define _CONFIGURE_SCHEDULER_ASSIGN \ 254 RTEMS_SCHEDULER_ASSIGN( \ 256 RTEMS_SCHEDULER_ASSIGN_PROCESSOR_OPTIONAL \ 258 _CONFIGURE_SCHEDULER_ASSIGN
259 #if _CONFIGURE_MAXIMUM_PROCESSORS >= 2 260 , _CONFIGURE_SCHEDULER_ASSIGN
262 #if _CONFIGURE_MAXIMUM_PROCESSORS >= 3 263 , _CONFIGURE_SCHEDULER_ASSIGN
265 #if _CONFIGURE_MAXIMUM_PROCESSORS >= 4 266 , _CONFIGURE_SCHEDULER_ASSIGN
268 #if _CONFIGURE_MAXIMUM_PROCESSORS >= 5 269 , _CONFIGURE_SCHEDULER_ASSIGN
271 #if _CONFIGURE_MAXIMUM_PROCESSORS >= 6 272 , _CONFIGURE_SCHEDULER_ASSIGN
274 #if _CONFIGURE_MAXIMUM_PROCESSORS >= 7 275 , _CONFIGURE_SCHEDULER_ASSIGN
277 #if _CONFIGURE_MAXIMUM_PROCESSORS >= 8 278 , _CONFIGURE_SCHEDULER_ASSIGN
280 #if _CONFIGURE_MAXIMUM_PROCESSORS >= 9 281 , _CONFIGURE_SCHEDULER_ASSIGN
283 #if _CONFIGURE_MAXIMUM_PROCESSORS >= 10 284 , _CONFIGURE_SCHEDULER_ASSIGN
286 #if _CONFIGURE_MAXIMUM_PROCESSORS >= 11 287 , _CONFIGURE_SCHEDULER_ASSIGN
289 #if _CONFIGURE_MAXIMUM_PROCESSORS >= 12 290 , _CONFIGURE_SCHEDULER_ASSIGN
292 #if _CONFIGURE_MAXIMUM_PROCESSORS >= 13 293 , _CONFIGURE_SCHEDULER_ASSIGN
295 #if _CONFIGURE_MAXIMUM_PROCESSORS >= 14 296 , _CONFIGURE_SCHEDULER_ASSIGN
298 #if _CONFIGURE_MAXIMUM_PROCESSORS >= 15 299 , _CONFIGURE_SCHEDULER_ASSIGN
301 #if _CONFIGURE_MAXIMUM_PROCESSORS >= 16 302 , _CONFIGURE_SCHEDULER_ASSIGN
304 #if _CONFIGURE_MAXIMUM_PROCESSORS >= 17 305 , _CONFIGURE_SCHEDULER_ASSIGN
307 #if _CONFIGURE_MAXIMUM_PROCESSORS >= 18 308 , _CONFIGURE_SCHEDULER_ASSIGN
310 #if _CONFIGURE_MAXIMUM_PROCESSORS >= 19 311 , _CONFIGURE_SCHEDULER_ASSIGN
313 #if _CONFIGURE_MAXIMUM_PROCESSORS >= 20 314 , _CONFIGURE_SCHEDULER_ASSIGN
316 #if _CONFIGURE_MAXIMUM_PROCESSORS >= 21 317 , _CONFIGURE_SCHEDULER_ASSIGN
319 #if _CONFIGURE_MAXIMUM_PROCESSORS >= 22 320 , _CONFIGURE_SCHEDULER_ASSIGN
322 #if _CONFIGURE_MAXIMUM_PROCESSORS >= 23 323 , _CONFIGURE_SCHEDULER_ASSIGN
325 #if _CONFIGURE_MAXIMUM_PROCESSORS >= 24 326 , _CONFIGURE_SCHEDULER_ASSIGN
328 #if _CONFIGURE_MAXIMUM_PROCESSORS >= 25 329 , _CONFIGURE_SCHEDULER_ASSIGN
331 #if _CONFIGURE_MAXIMUM_PROCESSORS >= 26 332 , _CONFIGURE_SCHEDULER_ASSIGN
334 #if _CONFIGURE_MAXIMUM_PROCESSORS >= 27 335 , _CONFIGURE_SCHEDULER_ASSIGN
337 #if _CONFIGURE_MAXIMUM_PROCESSORS >= 28 338 , _CONFIGURE_SCHEDULER_ASSIGN
340 #if _CONFIGURE_MAXIMUM_PROCESSORS >= 29 341 , _CONFIGURE_SCHEDULER_ASSIGN
343 #if _CONFIGURE_MAXIMUM_PROCESSORS >= 30 344 , _CONFIGURE_SCHEDULER_ASSIGN
346 #if _CONFIGURE_MAXIMUM_PROCESSORS >= 31 347 , _CONFIGURE_SCHEDULER_ASSIGN
349 #if _CONFIGURE_MAXIMUM_PROCESSORS >= 32 350 , _CONFIGURE_SCHEDULER_ASSIGN
352 #undef _CONFIGURE_SCHEDULER_ASSIGN 357 _CONFIGURE_MAXIMUM_PROCESSORS
358 == RTEMS_ARRAY_SIZE( _Scheduler_Initial_assignments ),
359 _Scheduler_Initial_assignments
const uint32_t _Scheduler_CBS_Maximum_servers
Evaluate Per-CPU Configuration Options.
Scheduler Configuration API.
#define _Scheduler_Count
Count of registered schedulers.
Definition: scheduler.h:325
Scheduler_CBS_Server _Scheduler_CBS_Server_list[]
const Scheduler_Control _Scheduler_Table[]
Registered schedulers.
Definition: schedulercbs.h:115
Scheduler control.
Definition: scheduler.h:269