37#ifndef _RTEMS_CONFDEFS_SCHEDULER_H
38#define _RTEMS_CONFDEFS_SCHEDULER_H
40#ifndef __CONFIGURATION_TEMPLATE_h
41#error "Do not include this file directly, use <rtems/confdefs.h> instead"
48#if !defined(CONFIGURE_SCHEDULER_CBS) \
49 && !defined(CONFIGURE_SCHEDULER_EDF) \
50 && !defined(CONFIGURE_SCHEDULER_EDF_SMP) \
51 && !defined(CONFIGURE_SCHEDULER_PRIORITY) \
52 && !defined(CONFIGURE_SCHEDULER_PRIORITY_AFFINITY_SMP) \
53 && !defined(CONFIGURE_SCHEDULER_PRIORITY_SMP) \
54 && !defined(CONFIGURE_SCHEDULER_SIMPLE) \
55 && !defined(CONFIGURE_SCHEDULER_SIMPLE_SMP) \
56 && !defined(CONFIGURE_SCHEDULER_STRONG_APA) \
57 && !defined(CONFIGURE_SCHEDULER_USER)
58 #if defined(RTEMS_SMP) && _CONFIGURE_MAXIMUM_PROCESSORS > 1
59 #define CONFIGURE_SCHEDULER_EDF_SMP
61 #define CONFIGURE_SCHEDULER_PRIORITY
65#include <rtems/scheduler.h>
71#ifndef CONFIGURE_MAXIMUM_PRIORITY
72 #define CONFIGURE_MAXIMUM_PRIORITY PRIORITY_DEFAULT_MAXIMUM
75#if CONFIGURE_MAXIMUM_PRIORITY != 3 \
76 && CONFIGURE_MAXIMUM_PRIORITY != 7 \
77 && CONFIGURE_MAXIMUM_PRIORITY != 15 \
78 && CONFIGURE_MAXIMUM_PRIORITY != 31 \
79 && CONFIGURE_MAXIMUM_PRIORITY != 63 \
80 && CONFIGURE_MAXIMUM_PRIORITY != 127 \
81 && CONFIGURE_MAXIMUM_PRIORITY != 255
82 #error "CONFIGURE_MAXIMUM_PRIORITY must be one of 3, 7, 15, 31, 63, 127, and 255"
85#if CONFIGURE_MAXIMUM_PRIORITY > PRIORITY_DEFAULT_MAXIMUM
86 #error "CONFIGURE_SCHEDULER_PRIORITY must be less than or equal to the architecture defined maximum priority"
89#ifdef CONFIGURE_SCHEDULER_PRIORITY
90 #ifndef CONFIGURE_SCHEDULER_NAME
91 #define CONFIGURE_SCHEDULER_NAME rtems_build_name( 'U', 'P', 'D', ' ' )
94 #ifndef CONFIGURE_SCHEDULER_TABLE_ENTRIES
95 #define CONFIGURE_SCHEDULER \
96 RTEMS_SCHEDULER_PRIORITY( \
98 CONFIGURE_MAXIMUM_PRIORITY + 1 \
101 #define CONFIGURE_SCHEDULER_TABLE_ENTRIES \
102 RTEMS_SCHEDULER_TABLE_PRIORITY( dflt, CONFIGURE_SCHEDULER_NAME )
106#ifdef CONFIGURE_SCHEDULER_PRIORITY_SMP
107 #ifndef CONFIGURE_SCHEDULER_NAME
108 #define CONFIGURE_SCHEDULER_NAME rtems_build_name( 'M', 'P', 'D', ' ' )
111 #ifndef CONFIGURE_SCHEDULER_TABLE_ENTRIES
112 #define CONFIGURE_SCHEDULER \
113 RTEMS_SCHEDULER_PRIORITY_SMP( \
115 CONFIGURE_MAXIMUM_PRIORITY + 1 \
118 #define CONFIGURE_SCHEDULER_TABLE_ENTRIES \
119 RTEMS_SCHEDULER_TABLE_PRIORITY_SMP( dflt, CONFIGURE_SCHEDULER_NAME )
123#ifdef CONFIGURE_SCHEDULER_PRIORITY_AFFINITY_SMP
124 #ifndef CONFIGURE_SCHEDULER_NAME
125 #define CONFIGURE_SCHEDULER_NAME rtems_build_name( 'M', 'P', 'A', ' ' )
128 #ifndef CONFIGURE_SCHEDULER_TABLE_ENTRIES
129 #define CONFIGURE_SCHEDULER \
130 RTEMS_SCHEDULER_PRIORITY_AFFINITY_SMP( \
132 CONFIGURE_MAXIMUM_PRIORITY + 1 \
135 #define CONFIGURE_SCHEDULER_TABLE_ENTRIES \
136 RTEMS_SCHEDULER_TABLE_PRIORITY_AFFINITY_SMP( \
138 CONFIGURE_SCHEDULER_NAME \
143#ifdef CONFIGURE_SCHEDULER_STRONG_APA
144 #ifndef CONFIGURE_SCHEDULER_NAME
145 #define CONFIGURE_SCHEDULER_NAME rtems_build_name( 'M', 'A', 'P', 'A' )
148 #ifndef CONFIGURE_SCHEDULER_TABLE_ENTRIES
149 #define CONFIGURE_SCHEDULER \
150 RTEMS_SCHEDULER_STRONG_APA( \
152 CONFIGURE_MAXIMUM_PRIORITY + 1 \
155 #define CONFIGURE_SCHEDULER_TABLE_ENTRIES \
156 RTEMS_SCHEDULER_TABLE_STRONG_APA( dflt, CONFIGURE_SCHEDULER_NAME )
160#ifdef CONFIGURE_SCHEDULER_SIMPLE
161 #ifndef CONFIGURE_SCHEDULER_NAME
162 #define CONFIGURE_SCHEDULER_NAME rtems_build_name( 'U', 'P', 'S', ' ' )
165 #ifndef CONFIGURE_SCHEDULER_TABLE_ENTRIES
166 #define CONFIGURE_SCHEDULER RTEMS_SCHEDULER_SIMPLE( dflt )
168 #define CONFIGURE_SCHEDULER_TABLE_ENTRIES \
169 RTEMS_SCHEDULER_TABLE_SIMPLE( dflt, CONFIGURE_SCHEDULER_NAME )
173#ifdef CONFIGURE_SCHEDULER_SIMPLE_SMP
174 #ifndef CONFIGURE_SCHEDULER_NAME
175 #define CONFIGURE_SCHEDULER_NAME rtems_build_name( 'M', 'P', 'S', ' ' )
178 #ifndef CONFIGURE_SCHEDULER_TABLE_ENTRIES
179 #define CONFIGURE_SCHEDULER \
180 RTEMS_SCHEDULER_SIMPLE_SMP( dflt )
182 #define CONFIGURE_SCHEDULER_TABLE_ENTRIES \
183 RTEMS_SCHEDULER_TABLE_SIMPLE_SMP( dflt, CONFIGURE_SCHEDULER_NAME )
187#ifdef CONFIGURE_SCHEDULER_EDF
188 #ifndef CONFIGURE_SCHEDULER_NAME
189 #define CONFIGURE_SCHEDULER_NAME rtems_build_name( 'U', 'E', 'D', 'F' )
192 #ifndef CONFIGURE_SCHEDULER_TABLE_ENTRIES
193 #define CONFIGURE_SCHEDULER RTEMS_SCHEDULER_EDF( dflt )
195 #define CONFIGURE_SCHEDULER_TABLE_ENTRIES \
196 RTEMS_SCHEDULER_TABLE_EDF( dflt, CONFIGURE_SCHEDULER_NAME )
200#ifdef CONFIGURE_SCHEDULER_EDF_SMP
201 #ifndef CONFIGURE_SCHEDULER_NAME
202 #define CONFIGURE_SCHEDULER_NAME rtems_build_name( 'M', 'E', 'D', 'F' )
205 #ifndef CONFIGURE_SCHEDULER_TABLE_ENTRIES
206 #define CONFIGURE_SCHEDULER RTEMS_SCHEDULER_EDF_SMP( dflt )
208 #define CONFIGURE_SCHEDULER_TABLE_ENTRIES \
209 RTEMS_SCHEDULER_TABLE_EDF_SMP( dflt, CONFIGURE_SCHEDULER_NAME )
213#ifdef CONFIGURE_SCHEDULER_CBS
214 #ifndef CONFIGURE_SCHEDULER_NAME
215 #define CONFIGURE_SCHEDULER_NAME rtems_build_name( 'U', 'C', 'B', 'S' )
218 #ifndef CONFIGURE_SCHEDULER_TABLE_ENTRIES
219 #define CONFIGURE_SCHEDULER RTEMS_SCHEDULER_CBS( dflt )
221 #define CONFIGURE_SCHEDULER_TABLE_ENTRIES \
222 RTEMS_SCHEDULER_TABLE_CBS( dflt, CONFIGURE_SCHEDULER_NAME )
225 #ifndef CONFIGURE_CBS_MAXIMUM_SERVERS
226 #define CONFIGURE_CBS_MAXIMUM_SERVERS CONFIGURE_MAXIMUM_TASKS
236#ifdef CONFIGURE_SCHEDULER
244 #pragma GCC diagnostic push
245 #pragma GCC diagnostic ignored "-Wpedantic"
247 #pragma GCC diagnostic pop
254#define _CONFIGURE_SCHEDULER_COUNT RTEMS_ARRAY_SIZE( _Scheduler_Table )
260const Scheduler_Assignment _Scheduler_Initial_assignments[] = {
261 #ifdef CONFIGURE_SCHEDULER_ASSIGNMENTS
264 #define _CONFIGURE_SCHEDULER_ASSIGN \
265 RTEMS_SCHEDULER_ASSIGN( \
267 RTEMS_SCHEDULER_ASSIGN_PROCESSOR_OPTIONAL \
269 _CONFIGURE_SCHEDULER_ASSIGN
270 #if _CONFIGURE_MAXIMUM_PROCESSORS >= 2
271 , _CONFIGURE_SCHEDULER_ASSIGN
273 #if _CONFIGURE_MAXIMUM_PROCESSORS >= 3
274 , _CONFIGURE_SCHEDULER_ASSIGN
276 #if _CONFIGURE_MAXIMUM_PROCESSORS >= 4
277 , _CONFIGURE_SCHEDULER_ASSIGN
279 #if _CONFIGURE_MAXIMUM_PROCESSORS >= 5
280 , _CONFIGURE_SCHEDULER_ASSIGN
282 #if _CONFIGURE_MAXIMUM_PROCESSORS >= 6
283 , _CONFIGURE_SCHEDULER_ASSIGN
285 #if _CONFIGURE_MAXIMUM_PROCESSORS >= 7
286 , _CONFIGURE_SCHEDULER_ASSIGN
288 #if _CONFIGURE_MAXIMUM_PROCESSORS >= 8
289 , _CONFIGURE_SCHEDULER_ASSIGN
291 #if _CONFIGURE_MAXIMUM_PROCESSORS >= 9
292 , _CONFIGURE_SCHEDULER_ASSIGN
294 #if _CONFIGURE_MAXIMUM_PROCESSORS >= 10
295 , _CONFIGURE_SCHEDULER_ASSIGN
297 #if _CONFIGURE_MAXIMUM_PROCESSORS >= 11
298 , _CONFIGURE_SCHEDULER_ASSIGN
300 #if _CONFIGURE_MAXIMUM_PROCESSORS >= 12
301 , _CONFIGURE_SCHEDULER_ASSIGN
303 #if _CONFIGURE_MAXIMUM_PROCESSORS >= 13
304 , _CONFIGURE_SCHEDULER_ASSIGN
306 #if _CONFIGURE_MAXIMUM_PROCESSORS >= 14
307 , _CONFIGURE_SCHEDULER_ASSIGN
309 #if _CONFIGURE_MAXIMUM_PROCESSORS >= 15
310 , _CONFIGURE_SCHEDULER_ASSIGN
312 #if _CONFIGURE_MAXIMUM_PROCESSORS >= 16
313 , _CONFIGURE_SCHEDULER_ASSIGN
315 #if _CONFIGURE_MAXIMUM_PROCESSORS >= 17
316 , _CONFIGURE_SCHEDULER_ASSIGN
318 #if _CONFIGURE_MAXIMUM_PROCESSORS >= 18
319 , _CONFIGURE_SCHEDULER_ASSIGN
321 #if _CONFIGURE_MAXIMUM_PROCESSORS >= 19
322 , _CONFIGURE_SCHEDULER_ASSIGN
324 #if _CONFIGURE_MAXIMUM_PROCESSORS >= 20
325 , _CONFIGURE_SCHEDULER_ASSIGN
327 #if _CONFIGURE_MAXIMUM_PROCESSORS >= 21
328 , _CONFIGURE_SCHEDULER_ASSIGN
330 #if _CONFIGURE_MAXIMUM_PROCESSORS >= 22
331 , _CONFIGURE_SCHEDULER_ASSIGN
333 #if _CONFIGURE_MAXIMUM_PROCESSORS >= 23
334 , _CONFIGURE_SCHEDULER_ASSIGN
336 #if _CONFIGURE_MAXIMUM_PROCESSORS >= 24
337 , _CONFIGURE_SCHEDULER_ASSIGN
339 #if _CONFIGURE_MAXIMUM_PROCESSORS >= 25
340 , _CONFIGURE_SCHEDULER_ASSIGN
342 #if _CONFIGURE_MAXIMUM_PROCESSORS >= 26
343 , _CONFIGURE_SCHEDULER_ASSIGN
345 #if _CONFIGURE_MAXIMUM_PROCESSORS >= 27
346 , _CONFIGURE_SCHEDULER_ASSIGN
348 #if _CONFIGURE_MAXIMUM_PROCESSORS >= 28
349 , _CONFIGURE_SCHEDULER_ASSIGN
351 #if _CONFIGURE_MAXIMUM_PROCESSORS >= 29
352 , _CONFIGURE_SCHEDULER_ASSIGN
354 #if _CONFIGURE_MAXIMUM_PROCESSORS >= 30
355 , _CONFIGURE_SCHEDULER_ASSIGN
357 #if _CONFIGURE_MAXIMUM_PROCESSORS >= 31
358 , _CONFIGURE_SCHEDULER_ASSIGN
360 #if _CONFIGURE_MAXIMUM_PROCESSORS >= 32
361 , _CONFIGURE_SCHEDULER_ASSIGN
363 #undef _CONFIGURE_SCHEDULER_ASSIGN
368 _CONFIGURE_MAXIMUM_PROCESSORS
370 _Scheduler_Initial_assignments
This header file evaluates configuration options related to the per-CPU configuration.
#define RTEMS_STATIC_ASSERT(_cond, _msg)
It is defined if a static analysis run is performed.
Definition: basedefs.h:841
#define RTEMS_ARRAY_SIZE(_array)
Gets the element count of the array.
Definition: basedefs.h:244
#define CONFIGURE_SCHEDULER_TABLE_ENTRIES
This configuration option is an initializer define.
Definition: appl-config.h:4986
#define CONFIGURE_SCHEDULER_ASSIGNMENTS
This configuration option is an initializer define.
Definition: appl-config.h:4577
#define CONFIGURE_CBS_MAXIMUM_SERVERS
This configuration option is an integer define.
Definition: appl-config.h:4465
Scheduler_CBS_Server _Scheduler_CBS_Server_list[]
const uint32_t _Scheduler_CBS_Maximum_servers
#define _Scheduler_Count
This constant contains the count of configured schedulers.
Definition: scheduler.h:393
const Scheduler_Control _Scheduler_Table[]
This table contains the configured schedulers.
Definition: schedulercbs.h:133
Scheduler control.
Definition: scheduler.h:335