source: rtems-docs/c-user/configuring_a_system.rst @ 8cf3d75

5
Last change on this file since 8cf3d75 was 8cf3d75, checked in by Sebastian Huber <sebastian.huber@…>, on 06/30/17 at 13:06:21

c-user: Document EDF SMP

Close #3056.

  • Property mode set to 100644
File size: 141.6 KB
Line 
1.. comment SPDX-License-Identifier: CC-BY-SA-4.0
2
3.. COMMENT: COPYRIGHT (c) 1988-2008.
4.. COMMENT: On-Line Applications Research Corporation (OAR).
5.. COMMENT: All rights reserved.
6
7.. _Configuring a System:
8
9Configuring a System
10********************
11
12.. index:: configuring a system
13
14Introduction
15============
16
17RTEMS must be configured for an application.  This configuration encompasses a
18variety of information including the length of each clock tick, the maximum
19number of each information RTEMS object that can be created, the application
20initialization tasks, the task scheduling algorithm to be used, and the device
21drivers in the application.
22
23Although this information is contained in data structures that are used by
24RTEMS at system initialization time, the data structures themselves should only
25rarely to be generated by hand. RTEMS provides a set of macros system which
26provides a simple standard mechanism to automate the generation of these
27structures.
28
29.. index:: confdefs.h
30.. index:: confdefs.h
31.. index:: <rtems/confdefs.h>
32.. index:: <rtems/confdefs.h>
33
34The RTEMS header file ``<rtems/confdefs.h>`` is at the core of the automatic
35generation of system configuration. It is based on the idea of setting macros
36which define configuration parameters of interest to the application and
37defaulting or calculating all others. This variety of macros can automatically
38produce all of the configuration data required for an RTEMS application.
39
40.. sidebar: Trivia:
41
42  The term ``confdefs`` is shorthand for a *Configuration Defaults*.
43
44As a general rule, application developers only specify values for the
45configuration parameters of interest to them. They define what resources or
46features they require. In most cases, when a parameter is not specified, it
47defaults to zero (0) instances, a standards compliant value, or disabled as
48appropriate. For example, by default there will be 256 task priority levels but
49this can be lowered by the application. This number of priority levels is
50required to be compliant with the RTEID/ORKID standards upon which the Classic
51API is based. There are similar cases where the default is selected to be
52compliant with with the POSIX standard.
53
54For each configuration parameter in the configuration tables, the macro
55corresponding to that field is discussed. The RTEMS Maintainers expect that all
56systems can be easily configured using the ``<rtems/confdefs.h>`` mechanism and
57that using this mechanism will avoid internal RTEMS configuration changes
58impacting applications.
59
60.. COMMENT: === Philosophy ===
61
62Default Value Selection Philosophy
63==================================
64
65The user should be aware that the defaults are intentionally set as low as
66possible.  By default, no application resources are configured.  The
67``<rtems/confdefs.h>`` file ensures that at least one application task or
68thread is configured and that at least one of the initialization task/thread
69tables is configured.
70
71.. COMMENT: === Sizing the RTEMS Workspace ===
72
73.. _Sizing the RTEMS Workspace:
74
75Sizing the RTEMS Workspace
76==========================
77
78The RTEMS Workspace is a user-specified block of memory reserved for use by
79RTEMS.  The application should NOT modify this memory.  This area consists
80primarily of the RTEMS data structures whose exact size depends upon the values
81specified in the Configuration Table.  In addition, task stacks and floating
82point context areas are dynamically allocated from the RTEMS Workspace.
83
84The ``<rtems/confdefs.h>`` mechanism calculates the size of the RTEMS Workspace
85automatically.  It assumes that all tasks are floating point and that all will
86be allocated the minimum stack space.  This calculation includes the amount of
87memory that will be allocated for internal use by RTEMS. The automatic
88calculation may underestimate the workspace size truly needed by the
89application, in which case one can use the ``CONFIGURE_MEMORY_OVERHEAD`` macro
90to add a value to the estimate. See :ref:`Specify Memory Overhead` for more
91details.
92
93The memory area for the RTEMS Workspace is determined by the BSP.  In case the
94RTEMS Workspace is too large for the available memory, then a fatal run-time
95error occurs and the system terminates.
96
97The file ``<rtems/confdefs.h>`` will calculate the value of the
98``work_space_size`` parameter of the Configuration Table. There are many
99parameters the application developer can specify to help ``<rtems/confdefs.h>``
100in its calculations.  Correctly specifying the application requirements via
101parameters such as ``CONFIGURE_EXTRA_TASK_STACKS`` and
102``CONFIGURE_MAXIMUM_TASKS`` is critical for production software.
103
104For each class of objects, the allocation can operate in one of two ways.  The
105default way has an ceiling on the maximum number of object instances which can
106concurrently exist in the system. Memory for all instances of that object class
107is reserved at system initialization.  The second way allocates memory for an
108initial number of objects and increases the current allocation by a fixed
109increment when required. Both ways allocate space from inside the RTEMS
110Workspace.
111
112See :ref:`Unlimited Objects` for more details about the second way, which
113allows for dynamic allocation of objects and therefore does not provide
114determinism.  This mode is useful mostly for when the number of objects cannot
115be determined ahead of time or when porting software for which you do not know
116the object requirements.
117
118The space needed for stacks and for RTEMS objects will vary from one version of
119RTEMS and from one target processor to another.  Therefore it is safest to use
120``<rtems/confdefs.h>`` and specify your application's requirements in terms of
121the numbers of objects and multiples of ``RTEMS_MINIMUM_STACK_SIZE``, as far as
122is possible. The automatic estimates of space required will in general change
123when:
124
125- a configuration parameter is changed,
126
127- task or interrupt stack sizes change,
128
129- the floating point attribute of a task changes,
130
131- task floating point attribute is altered,
132
133- RTEMS is upgraded, or
134
135- the target processor is changed.
136
137Failure to provide enough space in the RTEMS Workspace may result in fatal
138run-time errors terminating the system.
139
140.. COMMENT: === Potential Issues ===
141
142Potential Issues with RTEMS Workspace Size Estimation
143=====================================================
144
145The ``<rtems/confdefs.h>`` file estimates the amount of memory required for the
146RTEMS Workspace.  This estimate is only as accurate as the information given to
147``<rtems/confdefs.h>`` and may be either too high or too low for a variety of
148reasons.  Some of the reasons that ``<rtems/confdefs.h>`` may reserve too much
149memory for RTEMS are:
150
151- All tasks/threads are assumed to be floating point.
152
153Conversely, there are many more reasons that the resource estimate could be too
154low:
155
156- Task/thread stacks greater than minimum size must be accounted for explicitly
157  by developer.
158
159- Memory for messages is not included.
160
161- Device driver requirements are not included.
162
163- Network stack requirements are not included.
164
165- Requirements for add-on libraries are not included.
166
167In general, ``<rtems/confdefs.h>`` is very accurate when given enough
168information.  However, it is quite easy to use a library and forget to account
169for its resources.
170
171.. COMMENT: === Format to be followed for making changes in this file ===
172
173Format to be followed for making changes in this file
174=====================================================
175
176MACRO NAME:
177  Should be alphanumeric. Can have '_' (underscore).
178
179DATA TYPE:
180  Please refer to all existing formats.
181
182RANGE:
183  The range depends on the Data Type of the macro.
184
185  - If the data type is of type task priority, then its value should be an
186    integer in the range of 1 to 255.
187
188  - If the data type is an integer, then it can have numbers, characters (in
189    case the value is defined using another macro) and arithmetic operations
190    (+, -, \*, /).
191
192  - If the data type is a function pointer the first character should be an
193    alphabet or an underscore. The rest of the string can be alphanumeric.
194
195  - If the data type is RTEMS Attributes or RTEMS Mode then the string should
196    be alphanumeric.
197
198  - If the data type is RTEMS NAME then the value should be an integer>=0 or
199    ``RTEMS_BUILD_NAME( 'U', 'I', '1', ' ' )``
200
201DEFAULT VALUE:
202  The default value should be in the following formats- Please note that the
203  '.' (full stop) is necessary.
204
205  - In case the value is not defined then: This is not defined by default.
206
207  - If we know the default value then: The default value is XXX.
208
209  - If the default value is BSP Specific then: This option is BSP specific.
210
211DESCRIPTION:
212  The description of the macro. (No specific format)
213
214NOTES:
215  Any further notes. (No specific format)
216
217.. COMMENT: === Configuration Example ===
218
219Configuration Example
220=====================
221
222In the following example, the configuration information for a system with a
223single message queue, four (4) tasks, and a timeslice of fifty (50)
224milliseconds is as follows:
225
226.. code-block:: c
227
228    #include <bsp.h>
229    #define CONFIGURE_APPLICATION_NEEDS_CONSOLE_DRIVER
230    #define CONFIGURE_APPLICATION_NEEDS_CLOCK_DRIVER
231    #define CONFIGURE_MICROSECONDS_PER_TICK   1000 /* 1 millisecond */
232    #define CONFIGURE_TICKS_PER_TIMESLICE       50 /* 50 milliseconds */
233    #define CONFIGURE_RTEMS_INIT_TASKS_TABLE
234    #define CONFIGURE_MAXIMUM_TASKS 4
235    #define CONFIGURE_MAXIMUM_MESSAGE_QUEUES 1
236    #define CONFIGURE_MESSAGE_BUFFER_MEMORY \
237               CONFIGURE_MESSAGE_BUFFERS_FOR_QUEUE(20, sizeof(struct USER_MESSAGE))
238    #define CONFIGURE_INIT
239    #include <rtems/confdefs.h>
240
241In this example, only a few configuration parameters are specified. The impact
242of these are as follows:
243
244- The example specified ``CONFIGURE_RTEMS_INIT_TASK_TABLE`` but did not specify
245  any additional parameters. This results in a configuration of an application
246  which will begin execution of a single initialization task named ``Init``
247  which is non-preemptible and at priority one (1).
248
249- By specifying ``CONFIGURE_APPLICATION_NEEDS_CLOCK_DRIVER``, this application
250  is configured to have a clock tick device driver. Without a clock tick device
251  driver, RTEMS has no way to know that time is passing and will be unable to
252  support delays and wall time. Further configuration details about time are
253  provided. Per ``CONFIGURE_MICROSECONDS_PER_TICK`` and
254  ``CONFIGURE_TICKS_PER_TIMESLICE``, the user specified they wanted a clock
255  tick to occur each millisecond, and that the length of a timeslice would be
256  fifty (50) milliseconds.
257
258- By specifying ``CONFIGURE_APPLICATION_NEEDS_CONSOLE_DRIVER``, the application
259  will include a console device driver. Although the console device driver may
260  support a combination of multiple serial ports and display and keyboard
261  combinations, it is only required to provide a single device named
262  ``/dev/console``. This device will be used for Standard Input, Output and
263  Error I/O Streams. Thus when ``CONFIGURE_APPLICATION_NEEDS_CONSOLE_DRIVER``
264  is specified, implicitly three (3) file descriptors are reserved for the
265  Standard I/O Streams and those file descriptors are associated with
266  ``/dev/console`` during initialization. All console devices are expected to
267  support the POSIX*termios* interface.
268
269- The example above specifies via ``CONFIGURE_MAXIMUM_TASKS`` that the
270  application requires a maximum of four (4) simultaneously existing Classic
271  API tasks. Similarly, by specifying ``CONFIGURE_MAXIMUM_MESSAGE_QUEUES``,
272  there may be a maximum of only one (1) concurrently existent Classic API
273  message queues.
274
275- The most surprising configuration parameter in this example is the use of
276  ``CONFIGURE_MESSAGE_BUFFER_MEMORY``. Message buffer memory is allocated from
277  the RTEMS Workspace and must be accounted for. In this example, the single
278  message queue will have up to twenty (20) messages of type ``struct
279  USER_MESSAGE``.
280
281- The ``CONFIGURE_INIT`` constant must be defined in order to make
282  ``<rtems/confdefs.h>`` instantiate the configuration data structures.  This
283  can only be defined in one source file per application that includes
284  ``<rtems/confdefs.h>`` or the symbol table will be instantiated multiple
285  times and linking errors produced.
286
287This example illustrates that parameters have default values. Among other
288things, the application implicitly used the following defaults:
289
290- All unspecified types of communications and synchronization objects in the
291  Classic and POSIX Threads API have maximums of zero (0).
292
293- The filesystem will be the default filesystem which is the In-Memory File
294  System (IMFS).
295
296- The application will have the default number of priority levels.
297
298- The minimum task stack size will be that recommended by RTEMS for the target
299  architecture.
300
301.. COMMENT: === Unlimited Objects ===
302
303.. _Unlimited Objects:
304
305Unlimited Objects
306=================
307
308In real-time embedded systems the RAM is normally a limited, critical resource
309and dynamic allocation is avoided as much as possible to ensure predictable,
310deterministic execution times. For such cases, see :ref:`Sizing the RTEMS
311Workspace` for an overview of how to tune the size of the workspace.
312Frequently when users are porting software to RTEMS the precise resource
313requirements of the software is unknown. In these situations users do not need
314to control the size of the workspace very tightly because they just want to get
315the new software to run; later they can tune the workspace size as needed.
316
317The following API-independent object classes can be configured in unlimited
318mode:
319
320- POSIX Keys
321
322- POSIX Key Value Pairs
323
324The following object classes in the Classic API can be configured in unlimited
325mode:
326
327- Tasks
328
329- Timers
330
331- Semaphores
332
333- Message Queues
334
335- Periods
336
337- Barriers
338
339- Partitions
340
341- Regions
342
343- Ports
344
345Additionally, the following object classes from the POSIX API can be configured
346in unlimited mode:
347
348- Threads
349
350- Mutexes
351
352- Condition Variables
353
354- Timers
355
356- Message Queues
357
358- Message Queue Descriptors
359
360- Semaphores
361
362- Barriers
363
364- Read/Write Locks
365
366- Spinlocks
367
368The following object classes can *not* be configured in unlimited mode:
369
370- Drivers
371
372- File Descriptors
373
374- User Extensions
375
376- POSIX Queued Signals
377
378Due to the memory requirements of unlimited objects it is strongly recommended
379to use them only in combination with the unified work areas. See :ref:`Separate
380or Unified Work Areas` for more information on unified work areas.
381
382The following example demonstrates how the two simple configuration defines for
383unlimited objects and unified works areas can replace many seperate
384configuration defines for supported object classes:
385
386.. code-block:: c
387
388    #define CONFIGURE_APPLICATION_NEEDS_CLOCK_DRIVER
389    #define CONFIGURE_APPLICATION_NEEDS_CONSOLE_DRIVER
390    #define CONFIGURE_UNIFIED_WORK_AREAS
391    #define CONFIGURE_UNLIMITED_OBJECTS
392    #define CONFIGURE_RTEMS_INIT_TASKS_TABLE
393    #define CONFIGURE_INIT
394    #include <rtems/confdefs.h>
395
396Users are cautioned that using unlimited objects is not recommended for
397production software unless the dynamic growth is absolutely required. It is
398generally considered a safer embedded systems programming practice to know the
399system limits rather than experience an out of memory error at an arbitrary and
400largely unpredictable time in the field.
401
402.. COMMENT: === Per Object Class Unlimited Object Instances ===
403
404.. _Per Object Class Unlimited Object Instances:
405
406Per Object Class Unlimited Object Instances
407-------------------------------------------
408.. index:: rtems_resource_unlimited
409
410When the number of objects is not known ahead of time, RTEMS provides an
411auto-extending mode that can be enabled individually for each object type by
412using the macro ``rtems_resource_unlimited``. This takes a value as a
413parameter, and is used to set the object maximum number field in an API
414Configuration table. The value is an allocation unit size. When RTEMS is
415required to grow the object table it is grown by this size. The kernel will
416return the object memory back to the RTEMS Workspace when an object is
417destroyed. The kernel will only return an allocated block of objects to the
418RTEMS Workspace if at least half the allocation size of free objects remain
419allocated. RTEMS always keeps one allocation block of objects allocated. Here
420is an example of using ``rtems_resource_unlimited``:
421
422.. code-block:: c
423
424    #define CONFIGURE_MAXIMUM_TASKS rtems_resource_unlimited(5)
425
426.. index:: rtems_resource_is_unlimited
427.. index:: rtems_resource_maximum_per_allocation
428
429Object maximum specifications can be evaluated with the
430``rtems_resource_is_unlimited`` and``rtems_resource_maximum_per_allocation``
431macros.
432
433.. COMMENT: === Unlimited Object Instances ===
434
435.. _Unlimited Object Instances:
436
437Unlimited Object Instances
438--------------------------
439
440To ease the burden of developers who are porting new software RTEMS also
441provides the capability to make all object classes listed above operate in
442unlimited mode in a simple manner. The application developer is only
443responsible for enabling unlimited objects and specifying the allocation size.
444
445.. COMMENT: === CONFIGURE_UNLIMITED_OBJECTS ===
446
447.. _Enable Unlimited Object Instances:
448
449Enable Unlimited Object Instances
450---------------------------------
451.. index:: CONFIGURE_UNLIMITED_OBJECTS
452
453CONSTANT:
454    ``CONFIGURE_UNLIMITED_OBJECTS``
455
456DATA TYPE:
457    Boolean feature macro.
458
459RANGE:
460    Defined or undefined.
461
462DEFAULT VALUE:
463    This is not defined by default.
464
465DESCRIPTION:
466    ``CONFIGURE_UNLIMITED_OBJECTS`` enables ``rtems_resource_unlimited`` mode
467    for Classic API and POSIX API objects that do not already have a specific
468    maximum limit defined.
469
470NOTES:
471    When using unlimited objects, it is common practice to also specify
472    ``CONFIGURE_UNIFIED_WORK_AREAS`` so the system operates with a single pool
473    of memory for both RTEMS and application memory allocations.
474
475.. COMMENT: === CONFIGURE_UNLIMITED_ALLOCATION_SIZE ===
476
477.. _Specify Unlimited Objects Allocation Size:
478
479Specify Unlimited Objects Allocation Size
480-----------------------------------------
481
482CONSTANT:
483    ``CONFIGURE_UNLIMITED_ALLOCATION_SIZE``
484
485DATA TYPE:
486    Unsigned integer (``uint32_t``).
487
488RANGE:
489    Positive.
490
491DEFAULT VALUE:
492    If not defined and ``CONFIGURE_UNLIMITED_OBJECTS`` is defined, the default
493    value is eight (8).
494
495DESCRIPTION:
496    ``CONFIGURE_UNLIMITED_ALLOCATION_SIZE`` provides an allocation size to use
497    for ``rtems_resource_unlimited`` when using
498    ``CONFIGURE_UNLIMITED_OBJECTS``.
499
500NOTES:
501    By allowing users to declare all resources as being unlimited the user can
502    avoid identifying and limiting the resources
503    used. ``CONFIGURE_UNLIMITED_OBJECTS`` does not support varying the
504    allocation sizes for different objects; users who want that much control
505    can define the ``rtems_resource_unlimited`` macros themselves.
506
507.. code-block:: c
508
509    #define CONFIGURE_UNLIMITED_OBJECTS
510    #define CONFIGURE_UNLIMITED_ALLOCATION_SIZE 5
511
512.. COMMENT: === Classic API Configuration ===
513
514Classic API Configuration
515=========================
516
517This section defines the Classic API related system configuration parameters
518supported by ``<rtems/confdefs.h>``.
519
520.. COMMENT: === CONFIGURE_MAXIMUM_TASKS ===
521
522.. _Specify Maximum Classic API Tasks:
523
524Specify Maximum Classic API Tasks
525---------------------------------
526.. index:: CONFIGURE_MAXIMUM_TASKS
527
528CONSTANT:
529    ``CONFIGURE_MAXIMUM_TASKS``
530
531DATA TYPE:
532    Unsigned integer (``uint32_t``).
533
534RANGE:
535    Zero or positive.
536
537DEFAULT VALUE:
538    The default value is ``0``.
539
540DESCRIPTION:
541    ``CONFIGURE_MAXIMUM_TASKS`` is the maximum number of Classic API Tasks that
542    can be concurrently active.
543
544NOTES:
545    This object class can be configured in unlimited allocation mode.
546
547    The calculations for the required memory in the RTEMS Workspace for tasks
548    assume that each task has a minimum stack size and has floating point
549    support enabled.  The configuration parameter
550    ``CONFIGURE_EXTRA_TASK_STACKS`` is used to specify task stack requirements
551    *ABOVE* the minimum size required.  See :ref:`Reserve Task/Thread Stack
552    Memory Above Minimum` for more information about
553    ``CONFIGURE_EXTRA_TASK_STACKS``.
554
555    The maximum number of POSIX threads is specified by
556    ``CONFIGURE_MAXIMUM_POSIX_THREADS``.
557
558    A future enhancement to ``<rtems/confdefs.h>`` could be to eliminate the
559    assumption that all tasks have floating point enabled. This would require
560    the addition of a new configuration parameter to specify the number of
561    tasks which enable floating point support.
562
563.. COMMENT: XXX - Add xref to CONFIGURE_MAXIMUM_POSIX_THREADS.
564
565.. COMMENT: === CONFIGURE_ENABLE_CLASSIC_API_NOTEPADS ===
566
567.. _Specify Maximum Classic API Timers:
568
569Specify Maximum Classic API Timers
570----------------------------------
571.. index:: CONFIGURE_ENABLE_CLASSIC_API_NOTEPADS
572
573CONSTANT:
574    ``CONFIGURE_ENABLE_CLASSIC_API_NOTEPADS``
575
576DATA TYPE:
577    Boolean feature macro.
578
579RANGE:
580    Defined or undefined.
581
582DEFAULT VALUE:
583    This is not defined by default, and Classic API Notepads are not supported.
584
585DESCRIPTION:
586    ``CONFIGURE_ENABLE_CLASSIC_API_NOTEPADS`` should be defined if the
587    user wants to have support for Classic API Notepads in their application.
588
589NOTES:
590    Disabling Classic API Notepads saves the allocation of sixteen (16)
591    thirty-two bit integers. This saves sixty-four bytes per task/thread
592    plus the allocation overhead. Notepads are rarely used in applications
593    and this can save significant memory in a low RAM system. Classic API
594    Notepads are deprecated, and this option has been removed from
595    post 4.11 versions of RTEMS.
596
597.. COMMENT: === CONFIGURE_MAXIMUM_TIMERS ===
598
599.. _Specify Maximum Classic API Timers:
600
601Specify Maximum Classic API Timers
602----------------------------------
603.. index:: CONFIGURE_MAXIMUM_TIMERS
604
605CONSTANT:
606    ``CONFIGURE_MAXIMUM_TIMERS``
607
608DATA TYPE:
609    Unsigned integer (``uint32_t``).
610
611RANGE:
612    Zero or positive.
613
614DEFAULT VALUE:
615    The default value is 0.
616
617DESCRIPTION:
618    ``CONFIGURE_MAXIMUM_TIMERS`` is the maximum number of Classic API Timers
619    that can be concurrently active.
620
621NOTES:
622    This object class can be configured in unlimited allocation mode.
623
624.. COMMENT: === CONFIGURE_MAXIMUM_SEMAPHORES ===
625
626.. _Specify Maximum Classic API Semaphores:
627
628Specify Maximum Classic API Semaphores
629--------------------------------------
630.. index:: CONFIGURE_MAXIMUM_SEMAPHORES
631
632CONSTANT:
633    ``CONFIGURE_MAXIMUM_SEMAPHORES``
634
635DATA TYPE:
636    Unsigned integer (``uint32_t``).
637
638RANGE:
639    Zero or positive.
640
641DEFAULT VALUE:
642    The default value is 0.
643
644DESCRIPTION:
645    ``CONFIGURE_MAXIMUM_SEMAPHORES`` is the maximum number of Classic API
646    Semaphores that can be concurrently active.
647
648NOTES:
649    This object class can be configured in unlimited allocation mode.
650
651.. COMMENT: === CONFIGURE_MAXIMUM_MRSP_SEMAPHORES ===
652
653.. _Specify Maximum Classic API Semaphores usable with MrsP:
654
655Specify Maximum Classic API Semaphores usable with MrsP
656-------------------------------------------------------
657.. index:: CONFIGURE_MAXIMUM_MRSP_SEMAPHORES
658
659CONSTANT:
660    ``CONFIGURE_MAXIMUM_MRSP_SEMAPHORES``
661
662DATA TYPE:
663    Unsigned integer (``uint32_t``).
664
665RANGE:
666    Zero or positive.
667
668DEFAULT VALUE:
669    The default value is 0.
670
671DESCRIPTION:
672    ``CONFIGURE_MAXIMUM_MRSP_SEMAPHORES`` is the maximum number of Classic API
673    Semaphores using the :ref:`MrsP` that can be concurrently active.
674
675NOTES:
676    This configuration option is only used in SMP configurations.  In
677    uni-processor configurations, the :ref:`PriorityCeiling` is used for MrsP
678    semaphores and thus no extra memory is necessary.
679
680.. COMMENT: === CONFIGURE_MAXIMUM_MESSAGE_QUEUES ===
681
682.. _Specify Maximum Classic API Message Queues:
683
684Specify Maximum Classic API Message Queues
685------------------------------------------
686.. index:: CONFIGURE_MAXIMUM_MESSAGE_QUEUES
687
688CONSTANT:
689    ``CONFIGURE_MAXIMUM_MESSAGE_QUEUES``
690
691DATA TYPE:
692    Unsigned integer (``uint32_t``).
693
694RANGE:
695    Zero or positive.
696
697DEFAULT VALUE:
698    The default value is 0.
699
700DESCRIPTION:
701    ``CONFIGURE_MAXIMUM_MESSAGE_QUEUES`` is the maximum number of Classic API
702    Message Queues that can be concurrently active.
703
704NOTES:
705    This object class can be configured in unlimited allocation mode.
706
707.. COMMENT: === CONFIGURE_MAXIMUM_BARRIERS ===
708
709.. _Specify Maximum Classic API Barriers:
710
711Specify Maximum Classic API Barriers
712------------------------------------
713.. index:: CONFIGURE_MAXIMUM_BARRIERS
714
715CONSTANT:
716    ``CONFIGURE_MAXIMUM_BARRIERS``
717
718DATA TYPE:
719    Unsigned integer (``uint32_t``).
720
721RANGE:
722    Zero or positive.
723
724DEFAULT VALUE:
725    The default value is 0.
726
727DESCRIPTION:
728    ``CONFIGURE_MAXIMUM_BARRIERS`` is the maximum number of Classic API
729    Barriers that can be concurrently active.
730
731NOTES:
732    This object class can be configured in unlimited allocation mode.
733
734.. COMMENT: === CONFIGURE_MAXIMUM_PERIODS ===
735
736.. _Specify Maximum Classic API Periods:
737
738Specify Maximum Classic API Periods
739-----------------------------------
740.. index:: CONFIGURE_MAXIMUM_PERIODS
741
742CONSTANT:
743    ``CONFIGURE_MAXIMUM_PERIODS``
744
745DATA TYPE:
746    Unsigned integer (``uint32_t``).
747
748RANGE:
749    Zero or positive.
750
751DEFAULT VALUE:
752    The default value is 0.
753
754DESCRIPTION:
755    ``CONFIGURE_MAXIMUM_PERIODS`` is the maximum number of Classic API Periods
756    that can be concurrently active.
757
758NOTES:
759    This object class can be configured in unlimited allocation mode.
760
761.. COMMENT: === CONFIGURE_MAXIMUM_PARTITIONS ===
762
763.. _Specify Maximum Classic API Partitions:
764
765Specify Maximum Classic API Partitions
766--------------------------------------
767.. index:: CONFIGURE_MAXIMUM_PARTITIONS
768
769CONSTANT:
770    ``CONFIGURE_MAXIMUM_PARTITIONS``
771
772DATA TYPE:
773    Unsigned integer (``uint32_t``).
774
775RANGE:
776    Zero or positive.
777
778DEFAULT VALUE:
779    The default value is 0.
780
781DESCRIPTION:
782    ``CONFIGURE_MAXIMUM_PARTITIONS`` is the maximum number of Classic API
783    Partitions that can be concurrently active.
784
785NOTES:
786    This object class can be configured in unlimited allocation mode.
787
788.. COMMENT: === CONFIGURE_MAXIMUM_REGIONS ===
789
790.. _Specify Maximum Classic API Regions:
791
792Specify Maximum Classic API Regions
793-----------------------------------
794.. index:: CONFIGURE_MAXIMUM_REGIONS
795
796CONSTANT:
797    ``CONFIGURE_MAXIMUM_REGIONS``
798
799DATA TYPE:
800    Unsigned integer (``uint32_t``).
801
802RANGE:
803    Zero or positive.
804
805DEFAULT VALUE:
806    The default value is 0.
807
808DESCRIPTION:
809    ``CONFIGURE_MAXIMUM_REGIONS`` is the maximum number of Classic API Regions
810    that can be concurrently active.
811
812NOTES:
813    None.
814
815.. COMMENT: === CONFIGURE_MAXIMUM_PORTS ===
816
817.. _Specify Maximum Classic API Ports:
818
819Specify Maximum Classic API Ports
820---------------------------------
821.. index:: CONFIGURE_MAXIMUM_PORTS
822
823CONSTANT:
824    ``CONFIGURE_MAXIMUM_PORTS``
825
826DATA TYPE:
827    Unsigned integer (``uint32_t``).
828
829RANGE:
830    Zero or positive.
831
832DEFAULT VALUE:
833    The default value is 0.
834
835DESCRIPTION:
836    ``CONFIGURE_MAXIMUM_PORTS`` is the maximum number of Classic API Ports that
837    can be concurrently active.
838
839NOTES:
840    This object class can be configured in unlimited allocation mode.
841
842.. COMMENT: === CONFIGURE_MAXIMUM_USER_EXTENSIONS ===
843
844.. _Specify Maximum Classic API User Extensions:
845
846Specify Maximum Classic API User Extensions
847-------------------------------------------
848.. index:: CONFIGURE_MAXIMUM_USER_EXTENSIONS
849
850CONSTANT:
851    ``CONFIGURE_MAXIMUM_USER_EXTENSIONS``
852
853DATA TYPE:
854    Unsigned integer (``uint32_t``).
855
856RANGE:
857    Zero or positive.
858
859DEFAULT VALUE:
860    The default value is 0.
861
862DESCRIPTION:
863    ``CONFIGURE_MAXIMUM_USER_EXTENSIONS`` is the maximum number of Classic API
864    User Extensions that can be concurrently active.
865
866NOTES:
867    This object class can be configured in unlimited allocation mode.
868
869.. COMMENT: === Classic API Initialization Task Configuration ===
870
871Classic API Initialization Tasks Table Configuration
872====================================================
873
874The ``<rtems/confdefs.h>`` configuration system can automatically generate an
875Initialization Tasks Table named ``Initialization_tasks`` with a single entry.
876The following parameters control the generation of that table.
877
878.. COMMENT: === CONFIGURE_RTEMS_INIT_TASKS_TABLE ===
879
880.. _Instantiate Classic API Initialization Task Table:
881
882Instantiate Classic API Initialization Task Table
883-------------------------------------------------
884.. index:: CONFIGURE_RTEMS_INIT_TASKS_TABLE
885
886CONSTANT:
887    ``CONFIGURE_RTEMS_INIT_TASKS_TABLE``
888
889DATA TYPE:
890    Boolean feature macro.
891
892RANGE:
893    Defined or undefined.
894
895DEFAULT VALUE:
896    This is not defined by default.
897
898DESCRIPTION:
899    ``CONFIGURE_RTEMS_INIT_TASKS_TABLE`` is defined if the user wishes to use a
900    Classic RTEMS API Initialization Task Table. The table built by
901    ``<rtems/confdefs.h>`` specifies the parameters for a single task. This is
902    sufficient for applications which initialization the system from a single
903    task.
904
905    By default, this field is not defined as the user MUST select their own API
906    for initialization tasks.
907
908NOTES:
909    The application may choose to use the initialization tasks or threads table
910    from another API.
911
912    A compile time error will be generated if the user does not configure any
913    initialization tasks or threads.
914
915.. COMMENT: === CONFIGURE_INIT_TASK_ENTRY_POINT ===
916
917.. _Specifying Classic API Initialization Task Entry Point:
918
919Specifying Classic API Initialization Task Entry Point
920------------------------------------------------------
921.. index:: CONFIGURE_INIT_TASK_ENTRY_POINT
922
923CONSTANT:
924    ``CONFIGURE_INIT_TASK_ENTRY_POINT``
925
926DATA TYPE:
927    Task entry function pointer (``rtems_task_entry``).
928
929RANGE:
930    Valid task entry function pointer.
931
932DEFAULT VALUE:
933    The default value is ``Init``.
934
935DESCRIPTION:
936    ``CONFIGURE_INIT_TASK_ENTRY_POINT`` is the entry point (a.k.a. function
937    name) of the single initialization task defined by the Classic API
938    Initialization Tasks Table.
939
940NOTES:
941    The user must implement the function ``Init`` or the function name provided
942    in this configuration parameter.
943
944.. COMMENT: === CONFIGURE_INIT_TASK_NAME ===
945
946.. _Specifying Classic API Initialization Task Name:
947
948Specifying Classic API Initialization Task Name
949-----------------------------------------------
950.. index:: CONFIGURE_INIT_TASK_NAME
951
952CONSTANT:
953    ``CONFIGURE_INIT_TASK_NAME``
954
955DATA TYPE:
956    RTEMS Name (``rtems_name``).
957
958RANGE:
959    Any value.
960
961DEFAULT VALUE:
962    The default value is ``rtems_build_name( 'U', 'I', '1', ' ' )``.
963
964DESCRIPTION:
965    ``CONFIGURE_INIT_TASK_NAME`` is the name of the single initialization task
966    defined by the Classic API Initialization Tasks Table.
967
968NOTES:
969    None.
970
971.. COMMENT: === CONFIGURE_INIT_TASK_STACK_SIZE ===
972
973.. _Specifying Classic API Initialization Task Stack Size:
974
975Specifying Classic API Initialization Task Stack Size
976-----------------------------------------------------
977.. index:: CONFIGURE_INIT_TASK_STACK_SIZE
978
979CONSTANT:
980    ``CONFIGURE_INIT_TASK_STACK_SIZE``
981
982DATA TYPE:
983    Unsigned integer (``size_t``).
984
985RANGE:
986    Zero or positive.
987
988DEFAULT VALUE:
989    The default value is RTEMS_MINIMUM_STACK_SIZE.
990
991DESCRIPTION:
992    ``CONFIGURE_INIT_TASK_STACK_SIZE`` is the stack size of the single
993    initialization task defined by the Classic API Initialization Tasks Table.
994
995NOTES:
996    If the stack size specified is greater than the configured minimum, it must
997    be accounted for in ``CONFIGURE_EXTRA_TASK_STACKS``.  See :ref:`Reserve
998    Task/Thread Stack Memory Above Minimum` for more information about
999    ``CONFIGURE_EXTRA_TASK_STACKS``.
1000
1001.. COMMENT: === CONFIGURE_INIT_TASK_PRIORITY ===
1002
1003.. _Specifying Classic API Initialization Task Priority:
1004
1005Specifying Classic API Initialization Task Priority
1006---------------------------------------------------
1007.. index:: CONFIGURE_INIT_TASK_PRIORITY
1008
1009CONSTANT:
1010    ``CONFIGURE_INIT_TASK_PRIORITY``
1011
1012DATA TYPE:
1013    RTEMS Task Priority (``rtems_task_priority``).
1014
1015RANGE:
1016    One (1) to CONFIGURE_MAXIMUM_PRIORITY.
1017
1018DEFAULT VALUE:
1019    The default value is 1, which is the highest priority in the Classic API.
1020
1021DESCRIPTION:
1022    ``CONFIGURE_INIT_TASK_PRIORITY`` is the initial priority of the single
1023    initialization task defined by the Classic API Initialization Tasks Table.
1024
1025NOTES:
1026    None.
1027
1028.. COMMENT: === CONFIGURE_INIT_TASK_ATTRIBUTES ===
1029
1030.. _Specifying Classic API Initialization Task Attributes:
1031
1032Specifying Classic API Initialization Task Attributes
1033-----------------------------------------------------
1034.. index:: CONFIGURE_INIT_TASK_ATTRIBUTES
1035
1036CONSTANT:
1037    ``CONFIGURE_INIT_TASK_ATTRIBUTES``
1038
1039DATA TYPE:
1040    RTEMS Attributes (``rtems_attribute``).
1041
1042RANGE:
1043    Valid task attribute sets.
1044
1045DEFAULT VALUE:
1046    The default value is ``RTEMS_DEFAULT_ATTRIBUTES``.
1047
1048DESCRIPTION:
1049    ``CONFIGURE_INIT_TASK_ATTRIBUTES`` is the task attributes of the single
1050    initialization task defined by the Classic API Initialization Tasks Table.
1051
1052NOTES:
1053    None.
1054
1055.. COMMENT: === CONFIGURE_INIT_TASK_INITIAL_MODES ===
1056
1057.. _Specifying Classic API Initialization Task Modes:
1058
1059Specifying Classic API Initialization Task Modes
1060------------------------------------------------
1061.. index:: CONFIGURE_INIT_TASK_INITIAL_MODES
1062
1063CONSTANT:
1064    ``CONFIGURE_INIT_TASK_INITIAL_MODES``
1065
1066DATA TYPE:
1067    RTEMS Mode (``rtems_mode``).
1068
1069RANGE:
1070    Valid task mode sets.
1071
1072DEFAULT VALUE:
1073    The default value is ``RTEMS_NO_PREEMPT``.
1074
1075DESCRIPTION:
1076    ``CONFIGURE_INIT_TASK_INITIAL_MODES`` is the initial execution mode of the
1077    single initialization task defined by the Classic API Initialization Tasks
1078    Table.
1079
1080NOTES:
1081    None.
1082
1083.. COMMENT: === CONFIGURE_INIT_TASK_ARGUMENTS ===
1084
1085.. _Specifying Classic API Initialization Task Arguments:
1086
1087Specifying Classic API Initialization Task Arguments
1088----------------------------------------------------
1089.. index:: CONFIGURE_INIT_TASK_ARGUMENTS
1090
1091CONSTANT:
1092    ``CONFIGURE_INIT_TASK_ARGUMENTS``
1093
1094DATA TYPE:
1095    RTEMS Task Argument (``rtems_task_argument``).
1096
1097RANGE:
1098    Complete range of the type.
1099
1100DEFAULT VALUE:
1101    The default value is 0.
1102
1103DESCRIPTION:
1104    ``CONFIGURE_INIT_TASK_ARGUMENTS`` is the task argument of the single
1105    initialization task defined by the Classic API Initialization Tasks Table.
1106
1107NOTES:
1108    None.
1109
1110.. COMMENT: === CONFIGURE_HAS_OWN_INIT_TASK_TABLE ===
1111
1112.. _Not Using Generated Initialization Tasks Table:
1113
1114Not Using Generated Initialization Tasks Table
1115----------------------------------------------
1116.. index:: CONFIGURE_HAS_OWN_INIT_TASK_TABLE
1117
1118CONSTANT:
1119    ``CONFIGURE_HAS_OWN_INIT_TASK_TABLE``
1120
1121DATA TYPE:
1122    Boolean feature macro.
1123
1124RANGE:
1125    Defined or undefined.
1126
1127DEFAULT VALUE:
1128    This is not defined by default.
1129
1130DESCRIPTION:
1131    ``CONFIGURE_HAS_OWN_INIT_TASK_TABLE`` is defined if the user wishes to
1132    define their own Classic API Initialization Tasks Table.  This table should
1133    be named ``Initialization_tasks``.
1134
1135NOTES:
1136    This is a seldom used configuration parameter. The most likely use case is
1137    when an application desires to have more than one initialization task.
1138
1139.. COMMENT: === POSIX API Configuration ===
1140
1141POSIX API Configuration
1142=======================
1143
1144The parameters in this section are used to configure resources for the RTEMS
1145POSIX API.  They are only relevant if the POSIX API is enabled at configure
1146time using the ``--enable-posix`` option.
1147
1148.. COMMENT: === CONFIGURE_MAXIMUM_POSIX_THREADS ===
1149
1150.. _Specify Maximum POSIX API Threads:
1151
1152Specify Maximum POSIX API Threads
1153---------------------------------
1154.. index:: CONFIGURE_MAXIMUM_POSIX_THREADS
1155
1156CONSTANT:
1157    ``CONFIGURE_MAXIMUM_POSIX_THREADS``
1158
1159DATA TYPE:
1160    Unsigned integer (``uint32_t``).
1161
1162RANGE:
1163    Zero or positive.
1164
1165DEFAULT VALUE:
1166    The default value is 0.
1167
1168DESCRIPTION:
1169    ``CONFIGURE_MAXIMUM_POSIX_THREADS`` is the maximum number of POSIX API
1170    Threads that can be concurrently active.
1171
1172NOTES:
1173    This object class can be configured in unlimited allocation mode.
1174
1175    This calculations for the required memory in the RTEMS Workspace for
1176    threads assume that each thread has a minimum stack size and has floating
1177    point support enabled.  The configuration parameter
1178    ``CONFIGURE_EXTRA_TASK_STACKS`` is used to specify thread stack
1179    requirements *ABOVE* the minimum size required.  See :ref:`Reserve
1180    Task/Thread Stack Memory Above Minimum` for more information about
1181    ``CONFIGURE_EXTRA_TASK_STACKS``.
1182
1183    The maximum number of Classic API Tasks is specified by
1184    ``CONFIGURE_MAXIMUM_TASKS``.
1185
1186    All POSIX threads have floating point enabled.
1187
1188.. COMMENT: XXX - Add xref to CONFIGURE_MAXIMUM_TASKS.
1189
1190.. COMMENT: === CONFIGURE_MAXIMUM_POSIX_MUTEXES ===
1191
1192.. _Specify Maximum POSIX API Mutexes:
1193
1194Specify Maximum POSIX API Mutexes
1195---------------------------------
1196.. index:: CONFIGURE_MAXIMUM_POSIX_MUTEXES
1197
1198CONSTANT:
1199    ``CONFIGURE_MAXIMUM_POSIX_MUTEXES``
1200
1201DATA TYPE:
1202    Unsigned integer (``uint32_t``).
1203
1204RANGE:
1205    Zero or positive.
1206
1207DEFAULT VALUE:
1208    The default value is 0.
1209
1210DESCRIPTION:
1211    ``CONFIGURE_MAXIMUM_POSIX_MUTEXES`` is the maximum number of POSIX API
1212    Mutexes that can be concurrently active.
1213
1214NOTES:
1215    This object class can be configured in unlimited allocation mode.
1216
1217.. COMMENT: === CONFIGURE_MAXIMUM_POSIX_CONDITION_VARIABLES ===
1218
1219.. _Specify Maximum POSIX API Condition Variables:
1220
1221Specify Maximum POSIX API Condition Variables
1222---------------------------------------------
1223.. index:: CONFIGURE_MAXIMUM_POSIX_CONDITION_VARIABLES
1224
1225CONSTANT:
1226    ``CONFIGURE_MAXIMUM_POSIX_CONDITION_VARIABLES``
1227
1228DATA TYPE:
1229    Unsigned integer (``uint32_t``).
1230
1231RANGE:
1232    Zero or positive.
1233
1234DEFAULT VALUE:
1235    The default value is 0.
1236
1237DESCRIPTION:
1238    ``CONFIGURE_MAXIMUM_POSIX_CONDITION_VARIABLES`` is the maximum number of
1239    POSIX API Condition Variables that can be concurrently active.
1240
1241NOTES:
1242    This object class can be configured in unlimited allocation mode.
1243
1244.. COMMENT: === CONFIGURE_MAXIMUM_POSIX_KEYS ===
1245
1246.. _Specify Maximum POSIX API Keys:
1247
1248Specify Maximum POSIX API Keys
1249------------------------------
1250.. index:: CONFIGURE_MAXIMUM_POSIX_KEYS
1251
1252CONSTANT:
1253    ``CONFIGURE_MAXIMUM_POSIX_KEYS``
1254
1255DATA TYPE:
1256    Unsigned integer (``uint32_t``).
1257
1258RANGE:
1259    Zero or positive.
1260
1261DEFAULT VALUE:
1262    The default value is 0.
1263
1264DESCRIPTION:
1265    ``CONFIGURE_MAXIMUM_POSIX_KEYS`` is the maximum number of POSIX API Keys
1266    that can be concurrently active.
1267
1268NOTES:
1269    This object class can be configured in unlimited allocation mode.
1270
1271.. COMMENT: XXX - Key pairs
1272
1273.. COMMENT: === CONFIGURE_MAXIMUM_POSIX_TIMERS ===
1274
1275.. _Specify Maximum POSIX API Timers:
1276
1277Specify Maximum POSIX API Timers
1278--------------------------------
1279.. index:: CONFIGURE_MAXIMUM_POSIX_TIMERS
1280
1281CONSTANT:
1282    ``CONFIGURE_MAXIMUM_POSIX_TIMERS``
1283
1284DATA TYPE:
1285    Unsigned integer (``uint32_t``).
1286
1287RANGE:
1288    Zero or positive.
1289
1290DEFAULT VALUE:
1291    The default value is 0.
1292
1293DESCRIPTION:
1294    ``CONFIGURE_MAXIMUM_POSIX_TIMERS`` is the maximum number of POSIX API
1295    Timers that can be concurrently active.
1296
1297NOTES:
1298    This object class can be configured in unlimited allocation mode.
1299
1300.. COMMENT: === CONFIGURE_MAXIMUM_POSIX_QUEUED_SIGNALS ===
1301
1302.. _Specify Maximum POSIX API Queued Signals:
1303
1304Specify Maximum POSIX API Queued Signals
1305----------------------------------------
1306.. index:: CONFIGURE_MAXIMUM_POSIX_QUEUED_SIGNALS
1307
1308CONSTANT:
1309    ``CONFIGURE_MAXIMUM_POSIX_QUEUED_SIGNALS``
1310
1311DATA TYPE:
1312    Unsigned integer (``uint32_t``).
1313
1314RANGE:
1315    Zero or positive.
1316
1317DEFAULT VALUE:
1318    The default value is 0.
1319
1320DESCRIPTION:
1321    ``CONFIGURE_MAXIMUM_POSIX_QUEUED_SIGNALS`` is the maximum number of POSIX
1322    API Queued Signals that can be concurrently active.
1323
1324NOTES:
1325    None.
1326
1327.. COMMENT: === CONFIGURE_MAXIMUM_POSIX_MESSAGE_QUEUES ===
1328
1329.. _Specify Maximum POSIX API Message Queues:
1330
1331Specify Maximum POSIX API Message Queues
1332----------------------------------------
1333.. index:: CONFIGURE_MAXIMUM_POSIX_MESSAGE_QUEUES
1334
1335CONSTANT:
1336    ``CONFIGURE_MAXIMUM_POSIX_MESSAGE_QUEUES``
1337
1338DATA TYPE:
1339    Unsigned integer (``uint32_t``).
1340
1341RANGE:
1342    Zero or positive.
1343
1344DEFAULT VALUE:
1345    The default value is 0.
1346
1347DESCRIPTION:
1348    ``CONFIGURE_MAXIMUM_POSIX_MESSAGE_QUEUES`` is the maximum number of POSIX
1349    API Message Queues that can be concurrently active.
1350
1351NOTES:
1352    This object class can be configured in unlimited allocation mode.
1353
1354.. COMMENT: === CONFIGURE_MAXIMUM_POSIX_SEMAPHORES ===
1355
1356.. _Specify Maximum POSIX API Semaphores:
1357
1358Specify Maximum POSIX API Semaphores
1359------------------------------------
1360.. index:: CONFIGURE_MAXIMUM_POSIX_SEMAPHORES
1361
1362CONSTANT:
1363    ``CONFIGURE_MAXIMUM_POSIX_SEMAPHORES``
1364
1365DATA TYPE:
1366    Unsigned integer (``uint32_t``).
1367
1368RANGE:
1369    Zero or positive.
1370
1371DEFAULT VALUE:
1372    The default value is 0.
1373
1374DESCRIPTION:
1375    ``CONFIGURE_MAXIMUM_POSIX_SEMAPHORES`` is the maximum number of POSIX API
1376    Semaphores that can be concurrently active.
1377
1378NOTES:
1379    None.
1380
1381.. COMMENT: === CONFIGURE_MAXIMUM_POSIX_BARRIERS ===
1382
1383.. _Specify Maximum POSIX API Barriers:
1384
1385Specify Maximum POSIX API Barriers
1386----------------------------------
1387.. index:: CONFIGURE_MAXIMUM_POSIX_BARRIERS
1388
1389CONSTANT:
1390    ``CONFIGURE_MAXIMUM_POSIX_BARRIERS``
1391
1392DATA TYPE:
1393    Unsigned integer (``uint32_t``).
1394
1395RANGE:
1396    Zero or positive.
1397
1398DEFAULT VALUE:
1399    The default value is 0.
1400
1401DESCRIPTION:
1402    ``CONFIGURE_MAXIMUM_POSIX_BARRIERS`` is the maximum number of POSIX API
1403    Barriers that can be concurrently active.
1404
1405NOTES:
1406    This object class can be configured in unlimited allocation mode.
1407
1408.. COMMENT: === CONFIGURE_MAXIMUM_POSIX_SPINLOCKS ===
1409
1410.. _Specify Maximum POSIX API Spinlocks:
1411
1412Specify Maximum POSIX API Spinlocks
1413-----------------------------------
1414.. index:: CONFIGURE_MAXIMUM_POSIX_SPINLOCKS
1415
1416CONSTANT:
1417    ``CONFIGURE_MAXIMUM_POSIX_SPINLOCKS``
1418
1419DATA TYPE:
1420    Unsigned integer (``uint32_t``).
1421
1422RANGE:
1423    Zero or positive.
1424
1425DEFAULT VALUE:
1426    The default value is 0.
1427
1428DESCRIPTION:
1429    ``CONFIGURE_MAXIMUM_POSIX_SPINLOCKS`` is the maximum number of POSIX API
1430    Spinlocks that can be concurrently active.
1431
1432NOTES:
1433    This object class can be configured in unlimited allocation mode.
1434
1435.. COMMENT: === CONFIGURE_MAXIMUM_POSIX_RWLOCKS ===
1436
1437.. _Specify Maximum POSIX API Read/Write Locks:
1438
1439Specify Maximum POSIX API Read/Write Locks
1440------------------------------------------
1441.. index:: CONFIGURE_MAXIMUM_POSIX_RWLOCKS
1442
1443CONSTANT:
1444    ``CONFIGURE_MAXIMUM_POSIX_RWLOCKS``
1445
1446DATA TYPE:
1447    Unsigned integer (``uint32_t``).
1448
1449RANGE:
1450    Zero or positive.
1451
1452DEFAULT VALUE:
1453    The default value is 0.
1454
1455DESCRIPTION:
1456    ``CONFIGURE_MAXIMUM_POSIX_RWLOCKS`` is the maximum number of POSIX API
1457    Read/Write Locks that can be concurrently active.
1458
1459NOTES:
1460    This object class can be configured in unlimited allocation mode.
1461
1462.. COMMENT: === POSIX Initialization Threads Table Configuration ===
1463
1464POSIX Initialization Threads Table Configuration
1465================================================
1466
1467The ``<rtems/confdefs.h>`` configuration system can automatically generate a
1468POSIX Initialization Threads Table named ``POSIX_Initialization_threads`` with
1469a single entry.  The following parameters control the generation of that table.
1470
1471.. COMMENT: === CONFIGURE_POSIX_INIT_THREAD_TABLE ===
1472
1473.. _Instantiate POSIX API Initialization Thread Table:
1474
1475Instantiate POSIX API Initialization Thread Table
1476-------------------------------------------------
1477.. index:: CONFIGURE_POSIX_INIT_THREAD_TABLE
1478
1479CONSTANT:
1480
1481    ``CONFIGURE_POSIX_INIT_THREAD_TABLE``
1482
1483DATA TYPE:
1484    Boolean feature macro.
1485
1486RANGE:
1487    Defined or undefined.
1488
1489DEFAULT VALUE:
1490    This field is not defined by default, as the user MUST select their own API
1491    for initialization tasks.
1492
1493DESCRIPTION:
1494    ``CONFIGURE_POSIX_INIT_THREAD_TABLE`` is defined if the user wishes to use
1495    a POSIX API Initialization Threads Table.  The table built by
1496    ``<rtems/confdefs.h>`` specifies the parameters for a single thread. This
1497    is sufficient for applications which initialization the system from a
1498    single task.
1499
1500    By default, this field is not defined as the user MUST select their own API
1501    for initialization tasks.
1502
1503NOTES:
1504    The application may choose to use the initialization tasks or threads table
1505    from another API.
1506
1507    A compile time error will be generated if the user does not configure any
1508    initialization tasks or threads.
1509
1510.. COMMENT: === CONFIGURE_POSIX_INIT_THREAD_ENTRY_POINT ===
1511
1512.. _Specifying POSIX API Initialization Thread Entry Point:
1513
1514Specifying POSIX API Initialization Thread Entry Point
1515------------------------------------------------------
1516.. index:: CONFIGURE_POSIX_INIT_THREAD_ENTRY_POINT
1517
1518CONSTANT:
1519    ``CONFIGURE_POSIX_INIT_THREAD_ENTRY_POINT``
1520
1521DATA TYPE:
1522    POSIX thread function pointer (``void *(*entry_point)(void *)``).
1523
1524RANGE:
1525    Undefined or a valid POSIX thread function pointer.
1526
1527DEFAULT VALUE:
1528    The default value is ``POSIX_Init``.
1529
1530DESCRIPTION:
1531    ``CONFIGURE_POSIX_INIT_THREAD_ENTRY_POINT`` is the entry point
1532    (a.k.a. function name) of the single initialization thread defined by the
1533    POSIX API Initialization Threads Table.
1534
1535NOTES:
1536    The user must implement the function ``POSIX_Init`` or the function name
1537    provided in this configuration parameter.
1538
1539.. COMMENT: === CONFIGURE_POSIX_INIT_THREAD_STACK_SIZE ===
1540
1541.. _Specifying POSIX API Initialization Thread Stack Size:
1542
1543Specifying POSIX API Initialization Thread Stack Size
1544-----------------------------------------------------
1545.. index:: CONFIGURE_POSIX_INIT_THREAD_STACK_SIZE
1546
1547CONSTANT:
1548    ``CONFIGURE_POSIX_INIT_THREAD_STACK_SIZE``
1549
1550DATA TYPE:
1551    Unsigned integer (``size_t``).
1552
1553RANGE:
1554    Zero or positive.
1555
1556DEFAULT VALUE:
1557    The default value is 2 \* RTEMS_MINIMUM_STACK_SIZE.
1558
1559DESCRIPTION:
1560    ``CONFIGURE_POSIX_INIT_THREAD_STACK_SIZE`` is the stack size of the single
1561    initialization thread defined by the POSIX API Initialization Threads
1562    Table.
1563
1564NOTES:
1565    If the stack size specified is greater than the configured minimum, it must
1566    be accounted for in ``CONFIGURE_EXTRA_TASK_STACKS``.  See :ref:`Reserve
1567    Task/Thread Stack Memory Above Minimum` for more information about
1568    ``CONFIGURE_EXTRA_TASK_STACKS``.
1569
1570.. COMMENT: === CONFIGURE_POSIX_HAS_OWN_INIT_THREAD_TABLE ===
1571
1572.. _Not Using Generated POSIX Initialization Threads Table:
1573
1574Not Using Generated POSIX Initialization Threads Table
1575------------------------------------------------------
1576.. index:: CONFIGURE_POSIX_HAS_OWN_INIT_THREAD_TABLE
1577
1578CONSTANT:
1579    ``CONFIGURE_POSIX_HAS_OWN_INIT_THREAD_TABLE``
1580
1581DATA TYPE:
1582    Boolean feature macro.
1583
1584RANGE:
1585    Defined or undefined.
1586
1587DEFAULT VALUE:
1588    This is not defined by default.
1589
1590DESCRIPTION:
1591    ``CONFIGURE_POSIX_HAS_OWN_INIT_THREAD_TABLE`` is defined if the user wishes
1592    to define their own POSIX API Initialization Threads Table.  This table
1593    should be named ``POSIX_Initialization_threads``.
1594
1595NOTES:
1596    This is a seldom used configuration parameter. The most likely use case is
1597    when an application desires to have more than one initialization task.
1598
1599.. COMMENT: === Basic System Information ===
1600
1601Basic System Information
1602========================
1603
1604This section defines the general system configuration parameters supported by
1605``<rtems/confdefs.h>``.
1606
1607.. COMMENT: === CONFIGURE_UNIFIED_WORK_AREAS ===
1608
1609.. _Separate or Unified Work Areas:
1610
1611Separate or Unified Work Areas
1612------------------------------
1613.. index:: CONFIGURE_UNIFIED_WORK_AREAS
1614.. index:: unified work areas
1615.. index:: separate work areas
1616.. index:: RTEMS Workspace
1617.. index:: C Program Heap
1618
1619CONSTANT:
1620    ``CONFIGURE_UNIFIED_WORK_AREAS``
1621
1622DATA TYPE:
1623    Boolean feature macro.
1624
1625RANGE:
1626    Defined or undefined.
1627
1628DEFAULT VALUE:
1629    This is not defined by default, which specifies that the C Program Heap and
1630    the RTEMS Workspace will be separate.
1631
1632DESCRIPTION:
1633    When defined, the C Program Heap and the RTEMS Workspace will be one pool
1634    of memory.
1635
1636    When not defined, there will be separate memory pools for the RTEMS
1637    Workspace and C Program Heap.
1638
1639NOTES:
1640    Having separate pools does have some advantages in the event a task blows a
1641    stack or writes outside its memory area. However, in low memory systems the
1642    overhead of the two pools plus the potential for unused memory in either
1643    pool is very undesirable.
1644
1645    In high memory environments, this is desirable when you want to use the
1646    RTEMS "unlimited" objects option.  You will be able to create objects until
1647    you run out of all available memory rather then just until you run out of
1648    RTEMS Workspace.
1649
1650.. COMMENT: === CONFIGURE_MAXIMUM_PROCESSORS ===
1651
1652.. _CONFIGURE_MAXIMUM_PROCESSORS:
1653
1654Specify Maximum Processors
1655----------------------------------------
1656.. index:: CONFIGURE_MAXIMUM_PROCESSORS
1657
1658CONSTANT:
1659    ``CONFIGURE_MAXIMUM_PROCESSORS``
1660
1661DATA TYPE:
1662    Unsigned integer (``uint32_t``).
1663
1664RANGE:
1665    Positive.
1666
1667DEFAULT VALUE:
1668    The default value is 1.
1669
1670DESCRIPTION:
1671    ``CONFIGURE_MAXIMUM_PROCESSORS`` must be set to the maximum number of
1672    processors an applicaiton intends to use.  The number of acually available
1673    processors depends on the hardware and may be less.  It is recommended to
1674    use the smallest value suitable for the application in order to save
1675    memory.  Each processor needs an idle thread and interrupt stack for
1676    example.
1677
1678NOTES:
1679    If there are more processors available than configured, the rest will be
1680    ignored.  This configuration define is ignored in uni-processor
1681    configurations.
1682
1683.. COMMENT: === CONFIGURE_MICROSECONDS_PER_TICK ===
1684
1685.. _CONFIGURE_MICROSECONDS_PER_TICK:
1686
1687Length of Each Clock Tick
1688-------------------------
1689.. index:: CONFIGURE_MICROSECONDS_PER_TICK
1690.. index:: tick quantum
1691
1692CONSTANT:
1693    ``CONFIGURE_MICROSECONDS_PER_TICK``
1694
1695DATA TYPE:
1696    Unsigned integer (``uint32_t``).
1697
1698RANGE:
1699    Positive.
1700
1701DEFAULT VALUE:
1702    This is not defined by default. When not defined, the clock tick quantum is
1703    configured to be 10,000 microseconds which is ten (10) milliseconds.
1704
1705DESCRIPTION:
1706    This constant is  used to specify the length of time between clock ticks.
1707
1708    When the clock tick quantum value is too low, the system will spend so much
1709    time processing clock ticks that it does not have processing time available
1710    to perform application work. In this case, the system will become
1711    unresponsive.
1712
1713    The lowest practical time quantum varies widely based upon the speed of the
1714    target hardware and the architectural overhead associated with
1715    interrupts. In general terms, you do not want to configure it lower than is
1716    needed for the application.
1717
1718    The clock tick quantum should be selected such that it all blocking and
1719    delay times in the application are evenly divisible by it. Otherwise,
1720    rounding errors will be introduced which may negatively impact the
1721    application.
1722
1723NOTES:
1724    This configuration parameter has no impact if the Clock Tick Device driver
1725    is not configured.
1726
1727    There may be BSP specific limits on the resolution or maximum value of a
1728    clock tick quantum.
1729
1730.. COMMENT: === CONFIGURE_TICKS_PER_TIMESLICE ===
1731
1732.. _Specifying Timeslicing Quantum:
1733
1734Specifying Timeslicing Quantum
1735------------------------------
1736.. index:: CONFIGURE_TICKS_PER_TIMESLICE
1737.. index:: ticks per timeslice
1738
1739CONSTANT:
1740    ``CONFIGURE_TICKS_PER_TIMESLICE``
1741
1742DATA TYPE:
1743    Unsigned integer (``uint32_t``).
1744
1745RANGE:
1746    Positive.
1747
1748DEFAULT VALUE:
1749    The default value is 50.
1750
1751DESCRIPTION:
1752    This configuration parameter specifies the length of the timeslice quantum
1753    in ticks for each task.
1754
1755NOTES:
1756    This configuration parameter has no impact if the Clock Tick Device driver
1757    is not configured.
1758
1759.. COMMENT: === CONFIGURE_MAXIMUM_PRIORITY ===
1760
1761.. _Specifying the Number of Thread Priority Levels:
1762
1763Specifying the Number of Thread Priority Levels
1764-----------------------------------------------
1765.. index:: CONFIGURE_MAXIMUM_PRIORITY
1766.. index:: maximum priority
1767.. index:: number of priority levels
1768
1769CONSTANT:
1770    ``CONFIGURE_MAXIMUM_PRIORITY``
1771
1772DATA TYPE:
1773    Unsigned integer (``uint8_t``).
1774
1775RANGE:
1776    Valid values for this configuration parameter must be one (1) less than
1777    than a power of two (2) between 4 and 256 inclusively.  In other words,
1778    valid values are 3, 7, 31, 63, 127, and 255.
1779
1780DEFAULT VALUE:
1781    The default value is 255, because RTEMS must support 256 priority levels to
1782    be compliant with various standards. These priorities range from zero (0)
1783    to 255.
1784
1785DESCRIPTION:
1786   This configuration parameter specified the maximum numeric priority of any
1787   task in the system and one less that the number of priority levels in the
1788   system.
1789
1790   Reducing the number of priorities in the system reduces the amount of memory
1791   allocated from the RTEMS Workspace.
1792
1793NOTES:
1794   The numerically greatest priority is the logically lowest priority in the
1795   system and will thus be used by the IDLE task.
1796
1797   Priority zero (0) is reserved for internal use by RTEMS and is not available
1798   to applications.
1799
1800   With some schedulers, reducing the number of priorities can reduce the
1801   amount of memory used by the scheduler. For example, the Deterministic
1802   Priority Scheduler (DPS) used by default uses three pointers of storage per
1803   priority level. Reducing the number of priorities from 256 levels to
1804   sixteen (16) can reduce memory usage by about three (3) kilobytes.
1805
1806.. COMMENT: === CONFIGURE_MAXIMUM_THREAD_NAME_SIZE ===
1807
1808.. _CONFIGURE_MAXIMUM_THREAD_NAME_SIZE:
1809
1810Specifying the Maximum Thread Name Size
1811---------------------------------------
1812.. index:: CONFIGURE_MAXIMUM_THREAD_NAME_SIZE
1813.. index:: maximum thread name size
1814
1815CONSTANT:
1816    ``CONFIGURE_MAXIMUM_THREAD_NAME_SIZE``
1817
1818DATA TYPE:
1819    Unsigned integer (``size_t``).
1820
1821RANGE:
1822    No restrictions.
1823
1824DEFAULT VALUE:
1825    The default value is 16.  This value was chosen for Linux compatibility,
1826    see
1827    `PTHREAD_SETNAME_NP(3) <http://man7.org/linux/man-pages/man3/pthread_setname_np.3.html>`_.
1828
1829DESCRIPTION:
1830   This configuration parameter specifies the maximum thread name size
1831   including the terminating `NUL` character.
1832
1833NOTE:
1834   The size of the thread control block is increased by the maximum thread name
1835   size.  This configuration option is available since RTEMS 4.12.
1836
1837.. COMMENT: === CONFIGURE_MINIMUM_TASK_STACK_SIZE ===
1838
1839.. _Specifying the Minimum Task Size:
1840
1841Specifying the Minimum Task Size
1842--------------------------------
1843.. index:: CONFIGURE_MINIMUM_TASK_STACK_SIZE
1844.. index:: minimum task stack size
1845
1846CONSTANT:
1847    ``CONFIGURE_MINIMUM_TASK_STACK_SIZE``
1848
1849DATA TYPE:
1850    Unsigned integer (``uint32_t``).
1851
1852RANGE:
1853    Positive.
1854
1855DEFAULT VALUE:
1856    This is not defined by default, which sets the executive to the recommended
1857    minimum stack size for this processor.
1858
1859DESCRIPTION:
1860    The configuration parameter is set to the number of bytes the application
1861    wants the minimum stack size to be for every task or thread in the system.
1862
1863    Adjusting this parameter should be done with caution. Examining the actual
1864    usage using the Stack Checker Usage Reporting facility is recommended.
1865
1866NOTES:
1867    This parameter can be used to lower the minimum from that recommended. This
1868    can be used in low memory systems to reduce memory consumption for
1869    stacks. However, this must be done with caution as it could increase the
1870    possibility of a blown task stack.
1871
1872    This parameter can be used to increase the minimum from that
1873    recommended. This can be used in higher memory systems to reduce the risk
1874    of stack overflow without performing analysis on actual consumption.
1875
1876.. COMMENT: === CONFIGURE_INTERRUPT_STACK_SIZE ===
1877
1878.. _Configuring the Size of the Interrupt Stack:
1879
1880Configuring the Size of the Interrupt Stack
1881-------------------------------------------
1882.. index:: CONFIGURE_INTERRUPT_STACK_SIZE
1883.. index:: interrupt stack size
1884
1885CONSTANT:
1886    ``CONFIGURE_INTERRUPT_STACK_SIZE``
1887
1888DATA TYPE:
1889    Unsigned integer (``uint32_t``).
1890
1891RANGE:
1892    Positive.
1893
1894DEFAULT VALUE:
1895    The default value is CONFIGURE_MINIMUM_TASK_STACK_SIZE, which is the
1896    minimum interrupt stack size.
1897
1898DESCRIPTION:
1899    ``CONFIGURE_INTERRUPT_STACK_SIZE`` is set to the size of the interrupt
1900    stack.  The interrupt stack size is often set by the BSP but since this
1901    memory may be allocated from the RTEMS Workspace, it must be accounted for.
1902
1903NOTES:
1904    In some BSPs, changing this constant does NOT change the size of the
1905    interrupt stack, only the amount of memory reserved for it.
1906
1907    Patches which result in this constant only being used in memory
1908    calculations when the interrupt stack is intended to be allocated from the
1909    RTEMS Workspace would be welcomed by the RTEMS Project.
1910
1911.. COMMENT: === CONFIGURE_EXTRA_TASK_STACKS ===
1912
1913.. _Reserve Task/Thread Stack Memory Above Minimum:
1914
1915Reserve Task/Thread Stack Memory Above Minimum
1916----------------------------------------------
1917.. index:: CONFIGURE_EXTRA_TASK_STACKS
1918.. index:: memory for task tasks
1919
1920CONSTANT:
1921    ``CONFIGURE_EXTRA_TASK_STACKS``
1922
1923DATA TYPE:
1924    Unsigned integer (``size_t``).
1925
1926RANGE:
1927    Undefined or positive.
1928
1929DEFAULT VALUE:
1930    The default value is 0.
1931
1932DESCRIPTION:
1933    This configuration parameter is set to the number of bytes the applications
1934    wishes to add to the task stack requirements calculated by
1935    ``<rtems/confdefs.h>``.
1936
1937NOTES:
1938    This parameter is very important.  If the application creates tasks with
1939    stacks larger then the minimum, then that memory is NOT accounted for by
1940    ``<rtems/confdefs.h>``.
1941
1942.. COMMENT: === CONFIGURE_ZERO_WORKSPACE_AUTOMATICALLY ===
1943
1944.. _Automatically Zeroing the RTEMS Workspace and C Program Heap:
1945
1946Automatically Zeroing the RTEMS Workspace and C Program Heap
1947------------------------------------------------------------
1948.. index:: CONFIGURE_ZERO_WORKSPACE_AUTOMATICALLY
1949.. index:: clear C Program Heap
1950.. index:: clear RTEMS Workspace
1951.. index:: zero C Program Heap
1952.. index:: zero RTEMS Workspace
1953
1954CONSTANT:
1955    ``CONFIGURE_ZERO_WORKSPACE_AUTOMATICALLY``
1956
1957DATA TYPE:
1958    Boolean feature macro.
1959
1960RANGE:
1961    Defined or undefined.
1962
1963DEFAULT VALUE:
1964    This is not defined by default, unless overridden by the BSP.  The default
1965    is *NOT* to zero out the RTEMS Workspace or C Program Heap.
1966
1967DESCRIPTION:
1968    This macro indicates whether RTEMS should zero the RTEMS Workspace and C
1969    Program Heap as part of its initialization.  If defined, the memory regions
1970    are zeroed.  Otherwise, they are not.
1971
1972NOTES:
1973    Zeroing memory can add significantly to system boot time. It is not
1974    necessary for RTEMS but is often assumed by support libraries.
1975
1976.. COMMENT: === CONFIGURE_STACK_CHECKER_ENABLED ===
1977
1978.. _Enable The Task Stack Usage Checker:
1979
1980Enable The Task Stack Usage Checker
1981-----------------------------------
1982.. index:: CONFIGURE_STACK_CHECKER_ENABLED
1983
1984CONSTANT:
1985    ``CONFIGURE_STACK_CHECKER_ENABLED``
1986
1987DATA TYPE:
1988    Boolean feature macro.
1989
1990RANGE:
1991    Defined or undefined.
1992
1993DEFAULT VALUE:
1994    This is not defined by default, and thus stack checking is disabled.
1995
1996DESCRIPTION:
1997    This configuration parameter is defined when the application wishes to
1998    enable run-time stack bounds checking.
1999
2000NOTES:
2001    In 4.9 and older, this configuration parameter was named ``STACK_CHECKER_ON``.
2002
2003    This increases the time required to create tasks as well as adding overhead
2004    to each context switch.
2005
2006.. COMMENT: === CONFIGURE_INITIAL_EXTENSIONS ===
2007
2008.. _CONFIGURE_INITIAL_EXTENSIONS:
2009
2010Specify Application Specific User Extensions
2011--------------------------------------------
2012.. index:: CONFIGURE_INITIAL_EXTENSIONS
2013
2014CONSTANT:
2015    ``CONFIGURE_INITIAL_EXTENSIONS``
2016
2017DATA TYPE:
2018    List of user extension initializers (``rtems_extensions_table``).
2019
2020RANGE:
2021    Undefined or a list of one or more user extensions.
2022
2023DEFAULT VALUE:
2024    This is not defined by default.
2025
2026DESCRIPTION:
2027    If ``CONFIGURE_INITIAL_EXTENSIONS`` is defined by the application, then
2028    this application specific set of initial extensions will be placed in the
2029    initial extension table.
2030
2031NOTES:
2032    None.
2033
2034.. COMMENT: === Custom Stack Allocator ===
2035
2036Configuring Custom Task Stack Allocation
2037========================================
2038
2039RTEMS allows the application or BSP to define its own allocation and
2040deallocation methods for task stacks. This can be used to place task stacks in
2041special areas of memory or to utilize a Memory Management Unit so that stack
2042overflows are detected in hardware.
2043
2044.. COMMENT: === CONFIGURE_TASK_STACK_ALLOCATOR_INIT ===
2045
2046.. _Custom Task Stack Allocator Initialization:
2047
2048Custom Task Stack Allocator Initialization
2049------------------------------------------
2050.. index:: CONFIGURE_TASK_STACK_ALLOCATOR_INIT
2051
2052CONSTANT:
2053    ``CONFIGURE_TASK_STACK_ALLOCATOR_INIT``
2054
2055DATA TYPE:
2056    Function pointer.
2057
2058RANGE:
2059    Undefined, NULL or valid function pointer.
2060
2061DEFAULT VALUE:
2062    The default value is NULL, which indicates that task stacks will be
2063    allocated from the RTEMS Workspace.
2064
2065DESCRIPTION:
2066    ``CONFIGURE_TASK_STACK_ALLOCATOR_INIT`` configures the initialization
2067    method for an application or BSP specific task stack allocation
2068    implementation.
2069
2070NOTES:
2071    A correctly configured system must configure the following to be consistent:
2072
2073- ``CONFIGURE_TASK_STACK_ALLOCATOR_INIT``
2074
2075- ``CONFIGURE_TASK_STACK_ALLOCATOR``
2076
2077- ``CONFIGURE_TASK_STACK_DEALLOCATOR``
2078
2079.. COMMENT: === CONFIGURE_TASK_STACK_ALLOCATOR ===
2080
2081.. _Custom Task Stack Allocator:
2082
2083Custom Task Stack Allocator
2084---------------------------
2085.. index:: CONFIGURE_TASK_STACK_ALLOCATOR
2086
2087.. index:: task stack allocator
2088
2089CONSTANT:
2090    ``CONFIGURE_TASK_STACK_ALLOCATOR``
2091
2092DATA TYPE:
2093    Function pointer.
2094
2095RANGE:
2096    Undefined or valid function pointer.
2097
2098DEFAULT VALUE:
2099    The default value is ``_Workspace_Allocate``, which indicates that task
2100    stacks will be allocated from the RTEMS Workspace.
2101
2102DESCRIPTION:
2103    ``CONFIGURE_TASK_STACK_ALLOCATOR`` may point to a user provided routine to
2104    allocate task stacks.
2105
2106NOTES:
2107    A correctly configured system must configure the following to be consistent:
2108
2109- ``CONFIGURE_TASK_STACK_ALLOCATOR_INIT``
2110
2111- ``CONFIGURE_TASK_STACK_ALLOCATOR``
2112
2113- ``CONFIGURE_TASK_STACK_DEALLOCATOR``
2114
2115.. COMMENT: === CONFIGURE_TASK_STACK_DEALLOCATOR ===
2116
2117.. _Custom Task Stack Deallocator:
2118
2119Custom Task Stack Deallocator
2120-----------------------------
2121.. index:: CONFIGURE_TASK_STACK_DEALLOCATOR
2122.. index:: task stack deallocator
2123
2124CONSTANT:
2125    ``CONFIGURE_TASK_STACK_DEALLOCATOR``
2126
2127DATA TYPE:
2128    Function pointer.
2129
2130RANGE:
2131    Undefined or valid function pointer.
2132
2133DEFAULT VALUE:
2134    The default value is ``_Workspace_Free``, which indicates that task stacks
2135    will be allocated from the RTEMS Workspace.
2136
2137DESCRIPTION:
2138    ``CONFIGURE_TASK_STACK_DEALLOCATOR`` may point to a user provided routine
2139    to free task stacks.
2140
2141NOTES:
2142    A correctly configured system must configure the following to be consistent:
2143
2144- ``CONFIGURE_TASK_STACK_ALLOCATOR_INIT``
2145
2146- ``CONFIGURE_TASK_STACK_ALLOCATOR``
2147
2148- ``CONFIGURE_TASK_STACK_DEALLOCATOR``
2149
2150.. COMMENT: === Classic API Message Buffers ===
2151
2152Configuring Memory for Classic API Message Buffers
2153==================================================
2154
2155This section describes the configuration parameters related to specifying the
2156amount of memory reserved for Classic API Message Buffers.
2157
2158.. COMMENT: === CONFIGURE_MESSAGE_BUFFERS_FOR_QUEUE ===
2159
2160.. _Calculate Memory for a Single Classic Message API Message Queue:
2161
2162Calculate Memory for a Single Classic Message API Message Queue
2163---------------------------------------------------------------
2164.. index:: CONFIGURE_MESSAGE_BUFFERS_FOR_QUEUE
2165.. index:: memory for a single message queue's buffers
2166
2167CONSTANT:
2168    ``CONFIGURE_MESSAGE_BUFFERS_FOR_QUEUE(max_messages, size_per)``
2169
2170DATA TYPE:
2171    Unsigned integer (``size_t``).
2172
2173RANGE:
2174    Positive.
2175
2176DEFAULT VALUE:
2177    The default value is None.
2178
2179DESCRIPTION:
2180    This is a helper macro which is used to assist in computing the total
2181    amount of memory required for message buffers.  Each message queue will
2182    have its own configuration with maximum message size and maximum number of
2183    pending messages.
2184
2185    The interface for this macro is as follows:
2186
2187    .. code-block:: c
2188
2189        CONFIGURE_MESSAGE_BUFFERS_FOR_QUEUE(max_messages, size_per)
2190
2191    Where ``max_messages`` is the maximum number of pending messages and
2192    ``size_per`` is the size in bytes of the user message.
2193
2194NOTES:
2195
2196    This macro is only used in support of ``CONFIGURE_MESSAGE_BUFFER_MEMORY``.
2197
2198.. COMMENT: === CONFIGURE_MESSAGE_BUFFER_MEMORY ===
2199
2200.. _Reserve Memory for All Classic Message API Message Queues:
2201
2202Reserve Memory for All Classic Message API Message Queues
2203---------------------------------------------------------
2204.. index:: CONFIGURE_MESSAGE_BUFFER_MEMORY
2205.. index:: configure message queue buffer memory
2206
2207CONSTANT:
2208    ``CONFIGURE_MESSAGE_BUFFER_MEMORY``
2209
2210DATA TYPE:
2211    integer summation macro
2212
2213RANGE:
2214    undefined (zero) or calculation resulting in a positive integer
2215
2216DEFAULT VALUE:
2217    This is not defined by default, and zero (0) memory is reserved.
2218
2219DESCRIPTION:
2220    This macro is set to the number of bytes the application requires to be
2221    reserved for pending Classic API Message Queue buffers.
2222
2223NOTES:
2224    The following illustrates how the help macro
2225    ``CONFIGURE_MESSAGE_BUFFERS_FOR_QUEUE`` can be used to assist in
2226    calculating the message buffer memory required.  In this example, there are
2227    two message queues used in this application.  The first message queue has
2228    maximum of 24 pending messages with the message structure defined by the
2229    type ``one_message_type``.  The other message queue has maximum of 500
2230    pending messages with the message structure defined by the type
2231    ``other_message_type``.
2232
2233    .. code-block:: c
2234
2235        #define CONFIGURE_MESSAGE_BUFFER_MEMORY \
2236                    (CONFIGURE_MESSAGE_BUFFERS_FOR_QUEUE( \
2237                         24, sizeof(one_message_type) \
2238                     ) + \
2239                     CONFIGURE_MESSAGE_BUFFERS_FOR_QUEUE( \
2240                         500, sizeof(other_message_type) \
2241                     )
2242
2243.. COMMENT: === Seldom Used Configuration Parameters ===
2244
2245Seldom Used Configuration Parameters
2246====================================
2247
2248This section describes configuration parameters supported by
2249``<rtems/confdefs.h>`` which are seldom used by applications. These parameters
2250tend to be oriented to debugging system configurations and providing
2251work-arounds when the memory estimated by ``<rtems/confdefs.h>`` is incorrect.
2252
2253.. COMMENT: === CONFIGURE_MEMORY_OVERHEAD ===
2254
2255.. _Specify Memory Overhead:
2256
2257Specify Memory Overhead
2258-----------------------
2259.. index:: CONFIGURE_MEMORY_OVERHEAD
2260
2261CONSTANT:
2262    ``CONFIGURE_MEMORY_OVERHEAD``
2263
2264DATA TYPE:
2265    Unsigned integer (``size_t``).
2266
2267RANGE:
2268    Zero or positive.
2269
2270DEFAULT VALUE:
2271    The default value is 0.
2272
2273DESCRIPTION:
2274    This parameter is set to the number of kilobytes the application wishes to
2275    add to the requirements calculated by ``<rtems/confdefs.h>``.
2276
2277NOTES:
2278    This configuration parameter should only be used when it is suspected that
2279    a bug in ``<rtems/confdefs.h>`` has resulted in an underestimation.
2280    Typically the memory allocation will be too low when an application does
2281    not account for all message queue buffers or task stacks.
2282
2283.. COMMENT: === CONFIGURE_HAS_OWN_CONFIGURATION_TABLE ===
2284
2285.. _Do Not Generate Configuration Information:
2286
2287Do Not Generate Configuration Information
2288-----------------------------------------
2289.. index:: CONFIGURE_HAS_OWN_CONFIGURATION_TABLE
2290
2291CONSTANT:
2292    ``CONFIGURE_HAS_OWN_CONFIGURATION_TABLE``
2293
2294DATA TYPE:
2295    Boolean feature macro.
2296
2297RANGE:
2298    Defined or undefined.
2299
2300DEFAULT VALUE:
2301    This is not defined by default.
2302
2303DESCRIPTION:
2304    This configuration parameter should only be defined if the application is
2305    providing their own complete set of configuration tables.
2306
2307NOTES:
2308    None.
2309
2310.. COMMENT: === C Library Support Configuration ===
2311
2312C Library Support Configuration
2313===============================
2314
2315This section defines the file system and IO library related configuration
2316parameters supported by ``<rtems/confdefs.h>``.
2317
2318.. COMMENT: === CONFIGURE_LIBIO_MAXIMUM_FILE_DESCRIPTORS ===
2319
2320.. _Specify Maximum Number of File Descriptors:
2321
2322Specify Maximum Number of File Descriptors
2323------------------------------------------
2324.. index:: CONFIGURE_LIBIO_MAXIMUM_FILE_DESCRIPTORS
2325.. index:: maximum file descriptors
2326
2327CONSTANT:
2328    ``CONFIGURE_LIBIO_MAXIMUM_FILE_DESCRIPTORS``
2329
2330DATA TYPE:
2331    Unsigned integer (``uint32_t``).
2332
2333RANGE:
2334    Zero or positive.
2335
2336DEFAULT VALUE:
2337    If ``CONFIGURE_APPLICATION_NEEDS_CONSOLE_DRIVER`` is defined, then the
2338    default value is 3, otherwise the default value is 0.  Three file
2339    descriptors allows RTEMS to support standard input, output, and error I/O
2340    streams on ``/dev/console``.
2341
2342DESCRIPTION:
2343    This configuration parameter is set to the maximum number of file like
2344    objects that can be concurrently open.
2345
2346NOTES:
2347    None.
2348
2349.. COMMENT: === CONFIGURE_TERMIOS_DISABLED ===
2350
2351.. _Disable POSIX Termios Support:
2352
2353Disable POSIX Termios Support
2354-----------------------------
2355.. index:: CONFIGURE_TERMIOS_DISABLED
2356
2357CONSTANT:
2358    ``CONFIGURE_TERMIOS_DISABLED``
2359
2360DATA TYPE:
2361    Boolean feature macro.
2362
2363RANGE:
2364    Defined or undefined.
2365
2366DEFAULT VALUE:
2367    This is not defined by default, and resources are reserved for the termios
2368    functionality.
2369
2370DESCRIPTION:
2371    This configuration parameter is defined if the software implementing POSIX
2372    termios functionality is not going to be used by this application.
2373
2374NOTES:
2375    The termios support library should not be included in an application
2376    executable unless it is directly referenced by the application or a device
2377    driver.
2378
2379.. COMMENT: === CONFIGURE_NUMBER_OF_TERMIOS_PORTS ===
2380
2381.. _Specify Maximum Termios Ports:
2382
2383Specify Maximum Termios Ports
2384-----------------------------
2385.. index:: CONFIGURE_NUMBER_OF_TERMIOS_PORTS
2386
2387CONSTANT:
2388    ``CONFIGURE_NUMBER_OF_TERMIOS_PORTS``
2389
2390DATA TYPE:
2391    Unsigned integer.
2392
2393RANGE:
2394    Zero or positive.
2395
2396DEFAULT VALUE:
2397    The default value is 1, so a console port can be used.
2398
2399DESCRIPTION:
2400    This configuration parameter is set to the number of ports using the
2401    termios functionality.  Each concurrently active termios port requires
2402    resources.
2403
2404NOTES:
2405    If the application will be using serial ports including, but not limited
2406    to, the Console Device
2407    (e.g. ``CONFIGURE_APPLICATION_NEEDS_CONSOLE_DRIVER``), then it is highly
2408    likely that this configuration parameter should NOT be is defined.
2409
2410.. COMMENT: === File System Configuration Parameters ===
2411
2412File System Configuration Parameters
2413====================================
2414
2415This section defines File System related configuration parameters.
2416
2417.. COMMENT: === CONFIGURE_HAS_OWN_MOUNT_TABLE ===
2418
2419.. _Providing Application Specific Mount Table:
2420
2421Providing Application Specific Mount Table
2422------------------------------------------
2423.. index:: CONFIGURE_HAS_OWN_MOUNT_TABLE
2424
2425CONSTANT:
2426    ``CONFIGURE_HAS_OWN_MOUNT_TABLE``
2427
2428DATA TYPE:
2429    Undefined or an array of type ``rtems_filesystem_mount_table_t``.
2430
2431RANGE:
2432    Undefined or an array of type ``rtems_filesystem_mount_table_t``.
2433
2434DEFAULT VALUE:
2435    This is not defined by default.
2436
2437DESCRIPTION:
2438    This configuration parameter is defined when the application provides their
2439    own filesystem mount table.  The mount table is an array of
2440    ``rtems_filesystem_mount_table_t`` entries pointed to by the global
2441    variable ``rtems_filesystem_mount_table``.  The number of entries in this
2442    table is in an integer variable named ``rtems_filesystem_mount_table_t``.
2443
2444.. COMMENT: XXX - is the variable name for the count right?
2445
2446NOTES:
2447    None.
2448
2449.. COMMENT: XXX - Please provide an example
2450
2451.. COMMENT: === CONFIGURE_USE_DEVFS_AS_BASE_FILESYSTEM ===
2452
2453.. _Configure devFS as Root File System:
2454
2455Configure devFS as Root File System
2456-----------------------------------
2457.. index:: CONFIGURE_USE_DEVFS_AS_BASE_FILESYSTEM
2458
2459CONSTANT:
2460    ``CONFIGURE_USE_DEVFS_AS_BASE_FILESYSTEM``
2461
2462DATA TYPE:
2463    Boolean feature macro.
2464
2465RANGE:
2466    Defined or undefined.
2467
2468DEFAULT VALUE:
2469    This is not defined by default. If no other root file system configuration
2470    parameters are specified, the IMFS will be used as the root file system.
2471
2472DESCRIPTION:
2473    This configuration parameter is defined if the application wishes to use
2474    the device-only filesytem as the root file system.
2475
2476NOTES:
2477    The device-only filesystem supports only device nodes and is smaller in
2478    executable code size than the full IMFS and miniIMFS.
2479
2480    The devFS is comparable in functionality to the pseudo-filesystem name
2481    space provided before RTEMS release 4.5.0.
2482
2483.. COMMENT: === CONFIGURE_MAXIMUM_DEVICES ===
2484
2485.. _Specifying Maximum Devices for devFS:
2486
2487Specifying Maximum Devices for devFS
2488------------------------------------
2489.. index:: CONFIGURE_MAXIMUM_DEVICES
2490
2491CONSTANT:
2492    ``CONFIGURE_MAXIMUM_DEVICES``
2493
2494DATA TYPE:
2495    Unsigned integer (``uint32_t``).
2496
2497RANGE:
2498    Positive.
2499
2500DEFAULT VALUE:
2501    If ``BSP_MAXIMUM_DEVICES`` is defined, then the default value is
2502    ``BSP_MAXIMUM_DEVICES``, otherwise the default value is 4.
2503
2504DESCRIPTION:
2505    ``CONFIGURE_MAXIMUM_DEVICES`` is defined to the number of individual
2506    devices that may be registered in the device file system (devFS).
2507
2508NOTES:
2509    This option is specific to the device file system (devFS) and should not be
2510    confused with the ``CONFIGURE_MAXIMUM_DRIVERS`` option.  This parameter
2511    only impacts the devFS and thus is only used by ``<rtems/confdefs.h>`` when
2512    ``CONFIGURE_USE_DEVFS_AS_BASE_FILESYSTEM`` is specified.
2513
2514.. COMMENT: === CONFIGURE_APPLICATION_DISABLE_FILESYSTEM ===
2515
2516.. _Disable File System Support:
2517
2518Disable File System Support
2519---------------------------
2520.. index:: CONFIGURE_APPLICATION_DISABLE_FILESYSTEM
2521
2522CONSTANT:
2523    ``CONFIGURE_APPLICATION_DISABLE_FILESYSTEM``
2524
2525DATA TYPE:
2526    Boolean feature macro.
2527
2528RANGE:
2529    Defined or undefined.
2530
2531DEFAULT VALUE:
2532    This is not defined by default. If no other root file system configuration
2533    parameters are specified, the IMFS will be used as the root file system.
2534
2535DESCRIPTION:
2536    This configuration parameter is defined if the application dose not intend
2537    to use any kind of filesystem support. This include the device
2538    infrastructure necessary to support ``printf()``.
2539
2540NOTES:
2541    None.
2542
2543.. COMMENT: === CONFIGURE_USE_MINIIMFS_AS_BASE_FILESYSTEM ===
2544
2545.. _Use a Root IMFS with a Minimalistic Feature Set:
2546
2547Use a Root IMFS with a Minimalistic Feature Set
2548-----------------------------------------------
2549.. index:: CONFIGURE_USE_MINIIMFS_AS_BASE_FILESYSTEM
2550
2551CONSTANT:
2552    ``CONFIGURE_USE_MINIIMFS_AS_BASE_FILESYSTEM``
2553
2554DATA TYPE:
2555    Boolean feature macro.
2556
2557RANGE:
2558    Defined or undefined.
2559
2560DEFAULT VALUE:
2561    This is not defined by default.
2562
2563DESCRIPTION:
2564    In case this configuration option is defined, then the following
2565    configuration options will be defined as well
2566
2567    - ``CONFIGURE_IMFS_DISABLE_CHMOD``,
2568
2569    - ``CONFIGURE_IMFS_DISABLE_CHOWN``,
2570
2571    - ``CONFIGURE_IMFS_DISABLE_UTIME``,
2572
2573    - ``CONFIGURE_IMFS_DISABLE_LINK``,
2574
2575    - ``CONFIGURE_IMFS_DISABLE_SYMLINK``,
2576
2577    - ``CONFIGURE_IMFS_DISABLE_READLINK``,
2578
2579    - ``CONFIGURE_IMFS_DISABLE_RENAME``, and
2580
2581    - ``CONFIGURE_IMFS_DISABLE_UNMOUNT``.
2582
2583.. COMMENT: === CONFIGURE_IMFS_MEMFILE_BYTES_PER_BLOCK ===
2584
2585.. _Specify Block Size for IMFS:
2586
2587Specify Block Size for IMFS
2588---------------------------
2589.. index:: CONFIGURE_IMFS_MEMFILE_BYTES_PER_BLOCK
2590
2591CONSTANT:
2592    ``CONFIGURE_IMFS_MEMFILE_BYTES_PER_BLOCK``
2593
2594DATA TYPE:
2595    Boolean feature macro.
2596
2597RANGE:
2598    Valid values for this configuration parameter are a power of two (2)
2599    between 16 and 512 inclusive.  In other words, valid values are 16, 32, 64,
2600    128, 256,and 512.
2601
2602DEFAULT VALUE:
2603    The default IMFS block size is 128 bytes.
2604
2605DESCRIPTION:
2606    This configuration parameter specifies the block size for in-memory files
2607    managed by the IMFS. The configured block size has two impacts. The first
2608    is the average amount of unused memory in the last block of each file. For
2609    example, when the block size is 512, on average one-half of the last block
2610    of each file will remain unused and the memory is wasted. In contrast, when
2611    the block size is 16, the average unused memory per file is only 8
2612    bytes. However, it requires more allocations for the same size file and
2613    thus more overhead per block for the dynamic memory management.
2614
2615    Second, the block size has an impact on the maximum size file that can be
2616    stored in the IMFS. With smaller block size, the maximum file size is
2617    correspondingly smaller. The following shows the maximum file size possible
2618    based on the configured block size:
2619
2620    - when the block size is 16 bytes, the maximum file size is 1,328 bytes.
2621
2622    - when the block size is 32 bytes, the maximum file size is 18,656 bytes.
2623
2624    - when the block size is 64 bytes, the maximum file size is 279,488 bytes.
2625
2626    - when the block size is 128 bytes, the maximum file size is 4,329,344 bytes.
2627
2628    - when the block size is 256 bytes, the maximum file size is 68,173,568 bytes.
2629
2630    - when the block size is 512 bytes, the maximum file size is 1,082,195,456
2631      bytes.
2632
2633.. COMMENT: === CONFIGURE_IMFS_DISABLE_CHOWN ===
2634
2635.. _Disable Change Owner Support of Root IMFS:
2636
2637Disable Change Owner Support of Root IMFS
2638-----------------------------------------
2639.. index:: CONFIGURE_IMFS_DISABLE_CHOWN
2640
2641CONSTANT:
2642    ``CONFIGURE_IMFS_DISABLE_CHOWN``
2643
2644DATA TYPE:
2645    Boolean feature macro.
2646
2647RANGE:
2648    Defined or undefined.
2649
2650DEFAULT VALUE:
2651    This is not defined by default.
2652
2653DESCRIPTION:
2654    In case this configuration option is defined, then the support to change
2655    the owner is disabled in the root IMFS.
2656
2657.. COMMENT: === CONFIGURE_IMFS_DISABLE_CHMOD ===
2658
2659.. _Disable Change Mode Support of Root IMFS:
2660
2661Disable Change Mode Support of Root IMFS
2662----------------------------------------
2663.. index:: CONFIGURE_IMFS_DISABLE_CHMOD
2664
2665CONSTANT:
2666    ``CONFIGURE_IMFS_DISABLE_CHMOD``
2667
2668DATA TYPE:
2669    Boolean feature macro.
2670
2671RANGE:
2672    Defined or undefined.
2673
2674DEFAULT VALUE:
2675    This is not defined by default.
2676
2677DESCRIPTION:
2678    In case this configuration option is defined, then the support to change
2679    the mode is disabled in the root IMFS.
2680
2681.. COMMENT: === CONFIGURE_IMFS_DISABLE_UTIME ===
2682
2683.. _Disable Change Times Support of Root IMFS:
2684
2685Disable Change Times Support of Root IMFS
2686-----------------------------------------
2687.. index:: CONFIGURE_IMFS_DISABLE_UTIME
2688
2689CONSTANT:
2690    ``CONFIGURE_IMFS_DISABLE_UTIME``
2691
2692DATA TYPE:
2693    Boolean feature macro.
2694
2695RANGE:
2696    Defined or undefined.
2697
2698DEFAULT VALUE:
2699    This is not defined by default.
2700
2701DESCRIPTION:
2702    In case this configuration option is defined, then the support to change
2703    times is disabled in the root IMFS.
2704
2705.. COMMENT: === CONFIGURE_IMFS_DISABLE_LINK ===
2706
2707.. _Disable Create Hard Link Support of Root IMFS:
2708
2709Disable Create Hard Link Support of Root IMFS
2710---------------------------------------------
2711.. index:: CONFIGURE_IMFS_DISABLE_LINK
2712
2713CONSTANT:
2714    ``CONFIGURE_IMFS_DISABLE_LINK``
2715
2716DATA TYPE:
2717    Boolean feature macro.
2718
2719RANGE:
2720    Defined or undefined.
2721
2722DEFAULT VALUE:
2723    This is not defined by default.
2724
2725DESCRIPTION:
2726    In case this configuration option is defined, then the support to create
2727    hard links is disabled in the root IMFS.
2728
2729.. COMMENT: === CONFIGURE_IMFS_DISABLE_SYMLINK ===
2730
2731.. _Disable Create Symbolic Link Support of Root IMFS:
2732
2733Disable Create Symbolic Link Support of Root IMFS
2734-------------------------------------------------
2735.. index:: CONFIGURE_IMFS_DISABLE_SYMLINK
2736
2737CONSTANT:
2738    ``CONFIGURE_IMFS_DISABLE_SYMLINK``
2739
2740DATA TYPE:
2741    Boolean feature macro.
2742
2743RANGE:
2744    Defined or undefined.
2745
2746DEFAULT VALUE:
2747    This is not defined by default.
2748
2749DESCRIPTION:
2750    In case this configuration option is defined, then the support to create
2751    symbolic links is disabled in the root IMFS.
2752
2753.. COMMENT: === CONFIGURE_IMFS_DISABLE_READLINK ===
2754
2755.. _Disable Read Symbolic Link Support of Root IMFS:
2756
2757Disable Read Symbolic Link Support of Root IMFS
2758-----------------------------------------------
2759.. index:: CONFIGURE_IMFS_DISABLE_READLINK
2760
2761CONSTANT:
2762    ``CONFIGURE_IMFS_DISABLE_READLINK``
2763
2764DATA TYPE:
2765    Boolean feature macro.
2766
2767RANGE:
2768    Defined or undefined.
2769
2770DEFAULT VALUE:
2771    This is not defined by default.
2772
2773DESCRIPTION:
2774    In case this configuration option is defined, then the support to read
2775    symbolic links is disabled in the root IMFS.
2776
2777.. COMMENT: === CONFIGURE_IMFS_DISABLE_RENAME ===
2778
2779.. _Disable Rename Support of Root IMFS:
2780
2781Disable Rename Support of Root IMFS
2782-----------------------------------
2783.. index:: CONFIGURE_IMFS_DISABLE_RENAME
2784
2785CONSTANT:
2786    ``CONFIGURE_IMFS_DISABLE_RENAME``
2787
2788DATA TYPE:
2789    Boolean feature macro.
2790
2791RANGE:
2792    Defined or undefined.
2793
2794DEFAULT VALUE:
2795    This is not defined by default.
2796
2797DESCRIPTION:
2798    In case this configuration option is defined, then the support to rename
2799    nodes is disabled in the root IMFS.
2800
2801.. COMMENT: === CONFIGURE_IMFS_DISABLE_READDIR ===
2802
2803.. _Disable Directory Read Support of Root IMFS:
2804
2805Disable Directory Read Support of Root IMFS
2806-------------------------------------------
2807.. index:: CONFIGURE_IMFS_DISABLE_READDIR
2808
2809CONSTANT:
2810    ``CONFIGURE_IMFS_DISABLE_READDIR``
2811
2812DATA TYPE:
2813    Boolean feature macro.
2814
2815RANGE:
2816    Defined or undefined.
2817
2818DEFAULT VALUE:
2819    This is not defined by default.
2820
2821DESCRIPTION:
2822    In case this configuration option is defined, then the support to read a
2823    directory is disabled in the root IMFS.  It is still possible to open nodes
2824    in a directory.
2825
2826.. COMMENT: === CONFIGURE_IMFS_DISABLE_MOUNT ===
2827
2828.. _Disable Mount Support of Root IMFS:
2829
2830Disable Mount Support of Root IMFS
2831----------------------------------
2832.. index:: CONFIGURE_IMFS_DISABLE_MOUNT
2833
2834CONSTANT:
2835    ``CONFIGURE_IMFS_DISABLE_MOUNT``
2836
2837DATA TYPE:
2838    Boolean feature macro.
2839
2840RANGE:
2841    Defined or undefined.
2842
2843DEFAULT VALUE:
2844    This is not defined by default.
2845
2846DESCRIPTION:
2847    In case this configuration option is defined, then the support to mount
2848    other file systems is disabled in the root IMFS.
2849
2850.. COMMENT: === CONFIGURE_IMFS_DISABLE_UNMOUNT ===
2851
2852.. _Disable Unmount Support of Root IMFS:
2853
2854Disable Unmount Support of Root IMFS
2855------------------------------------
2856.. index:: CONFIGURE_IMFS_DISABLE_UNMOUNT
2857
2858CONSTANT:
2859    ``CONFIGURE_IMFS_DISABLE_UNMOUNT``
2860
2861DATA TYPE:
2862    Boolean feature macro.
2863
2864RANGE:
2865    Defined or undefined.
2866
2867DEFAULT VALUE:
2868    This is not defined by default.
2869
2870DESCRIPTION:
2871    In case this configuration option is defined, then the support to unmount
2872    file systems is disabled in the root IMFS.
2873
2874.. COMMENT: === CONFIGURE_IMFS_DISABLE_MKNOD ===
2875
2876.. _Disable Make Nodes Support of Root IMFS:
2877
2878Disable Make Nodes Support of Root IMFS
2879---------------------------------------
2880.. index:: CONFIGURE_IMFS_DISABLE_MKNOD
2881
2882CONSTANT:
2883    ``CONFIGURE_IMFS_DISABLE_MKNOD``
2884
2885DATA TYPE:
2886    Boolean feature macro.
2887
2888RANGE:
2889    Defined or undefined.
2890
2891DEFAULT VALUE:
2892    This is not defined by default.
2893
2894DESCRIPTION:
2895    In case this configuration option is defined, then the support to make
2896    directories, devices, regular files and FIFOs is disabled in the root IMFS.
2897
2898.. COMMENT: === CONFIGURE_IMFS_DISABLE_MKNOD_FILE ===
2899
2900.. _Disable Make Files Support of Root IMFS:
2901
2902Disable Make Files Support of Root IMFS
2903---------------------------------------
2904.. index:: CONFIGURE_IMFS_DISABLE_MKNOD_FILE
2905
2906CONSTANT:
2907    ``CONFIGURE_IMFS_DISABLE_MKNOD_FILE``
2908
2909DATA TYPE:
2910    Boolean feature macro.
2911
2912RANGE:
2913    Defined or undefined.
2914
2915DEFAULT VALUE:
2916    This is not defined by default.
2917
2918DESCRIPTION:
2919    In case this configuration option is defined, then the support to make
2920    regular files is disabled in the root IMFS.
2921
2922.. COMMENT: === CONFIGURE_IMFS_DISABLE_RMNOD ===
2923
2924.. _Disable Remove Nodes Support of Root IMFS:
2925
2926Disable Remove Nodes Support of Root IMFS
2927-----------------------------------------
2928.. index:: CONFIGURE_IMFS_DISABLE_RMNOD
2929
2930CONSTANT:
2931    ``CONFIGURE_IMFS_DISABLE_RMNOD``
2932
2933DATA TYPE:
2934    Boolean feature macro.
2935
2936RANGE:
2937    Defined or undefined.
2938
2939DEFAULT VALUE:
2940    This is not defined by default.
2941
2942DESCRIPTION:
2943    In case this configuration option is defined, then the support to remove
2944    nodes is disabled in the root IMFS.
2945
2946.. COMMENT: === Block Device Cache Configuration ===
2947
2948Block Device Cache Configuration
2949================================
2950
2951This section defines Block Device Cache (bdbuf) related configuration
2952parameters.
2953
2954.. COMMENT: === CONFIGURE_APPLICATION_NEEDS_LIBBLOCK ===
2955
2956.. _Enable Block Device Cache:
2957
2958Enable Block Device Cache
2959-------------------------
2960.. index:: CONFIGURE_APPLICATION_NEEDS_LIBBLOCK
2961
2962CONSTANT:
2963    ``CONFIGURE_APPLICATION_NEEDS_LIBBLOCK``
2964
2965DATA TYPE:
2966    Boolean feature macro.
2967
2968RANGE:
2969    Defined or undefined.
2970
2971DEFAULT VALUE:
2972    This is not defined by default.
2973
2974DESCRIPTION:
2975    Provides a Block Device Cache configuration.
2976
2977NOTES:
2978    Each option of the Block Device Cache configuration can be explicitly set
2979    by the user with the configuration options below.  The Block Device Cache
2980    is used for example by the RFS and DOSFS file systems.
2981
2982.. COMMENT: === CONFIGURE_BDBUF_CACHE_MEMORY_SIZE ===
2983
2984.. _Size of the Cache Memory:
2985
2986Size of the Cache Memory
2987------------------------
2988.. index:: CONFIGURE_BDBUF_CACHE_MEMORY_SIZE
2989
2990CONSTANT:
2991    ``CONFIGURE_BDBUF_CACHE_MEMORY_SIZE``
2992
2993DATA TYPE:
2994    Unsigned integer (``size_t``).
2995
2996RANGE:
2997    Positive.
2998
2999DEFAULT VALUE:
3000    The default value is 32768 bytes.
3001
3002DESCRIPTION:
3003    Size of the cache memory in bytes.
3004
3005NOTES:
3006    None.
3007
3008.. COMMENT: === CONFIGURE_BDBUF_BUFFER_MIN_SIZE ===
3009
3010.. _Minimum Size of a Buffer:
3011
3012Minimum Size of a Buffer
3013------------------------
3014.. index:: CONFIGURE_BDBUF_BUFFER_MIN_SIZE
3015
3016CONSTANT:
3017    ``CONFIGURE_BDBUF_BUFFER_MIN_SIZE``
3018
3019DATA TYPE:
3020    Unsigned integer (``uint32_t``).
3021
3022RANGE:
3023    Positive.
3024
3025DEFAULT VALUE:
3026    The default value is 512 bytes.
3027
3028DESCRIPTION:
3029    Defines the minimum size of a buffer in bytes.
3030
3031NOTES:
3032    None.
3033
3034.. COMMENT: === CONFIGURE_BDBUF_BUFFER_MAX_SIZE ===
3035
3036.. _Maximum Size of a Buffer:
3037
3038Maximum Size of a Buffer
3039------------------------
3040.. index:: CONFIGURE_BDBUF_BUFFER_MAX_SIZE
3041
3042CONSTANT:
3043    ``CONFIGURE_BDBUF_BUFFER_MAX_SIZE``
3044
3045DATA TYPE:
3046    Unsigned integer (``uint32_t``).
3047
3048RANGE:
3049    It must be positive and an integral multiple of the buffer minimum size.
3050
3051DEFAULT VALUE:
3052    The default value is 4096 bytes.
3053
3054DESCRIPTION:
3055    Defines the maximum size of a buffer in bytes.
3056
3057NOTES:
3058    None.
3059
3060.. COMMENT: === CONFIGURE_SWAPOUT_SWAP_PERIOD ===
3061
3062.. _Swapout Task Swap Period:
3063
3064Swapout Task Swap Period
3065------------------------
3066.. index:: CONFIGURE_SWAPOUT_SWAP_PERIOD
3067
3068CONSTANT:
3069    ``CONFIGURE_SWAPOUT_SWAP_PERIOD``
3070
3071DATA TYPE:
3072    Unsigned integer (``uint32_t``).
3073
3074RANGE:
3075    Positive.
3076
3077DEFAULT VALUE:
3078    The default value is 250 milliseconds.
3079
3080DESCRIPTION:
3081    Defines the swapout task swap period in milliseconds.
3082
3083NOTES:
3084    None.
3085
3086.. COMMENT: === CONFIGURE_SWAPOUT_BLOCK_HOLD ===
3087
3088.. _Swapout Task Maximum Block Hold Time:
3089
3090Swapout Task Maximum Block Hold Time
3091------------------------------------
3092.. index:: CONFIGURE_SWAPOUT_BLOCK_HOLD
3093
3094CONSTANT:
3095    ``CONFIGURE_SWAPOUT_BLOCK_HOLD``
3096
3097DATA TYPE:
3098    Unsigned integer (``uint32_t``).
3099
3100RANGE:
3101    Positive.
3102
3103DEFAULT VALUE:
3104    The default value is 1000 milliseconds.
3105
3106DESCRIPTION:
3107    Defines the swapout task maximum block hold time in milliseconds.
3108
3109NOTES:
3110    None.
3111
3112.. COMMENT: === CONFIGURE_SWAPOUT_TASK_PRIORITY ===
3113
3114.. _Swapout Task Priority:
3115
3116Swapout Task Priority
3117---------------------
3118.. index:: CONFIGURE_SWAPOUT_TASK_PRIORITY
3119
3120CONSTANT:
3121    ``CONFIGURE_SWAPOUT_TASK_PRIORITY``
3122
3123DATA TYPE:
3124    Task priority (``rtems_task_priority``).
3125
3126RANGE:
3127    Valid task priority.
3128
3129DEFAULT VALUE:
3130    The default value is 15.
3131
3132DESCRIPTION:
3133    Defines the swapout task priority.
3134
3135NOTES:
3136    None.
3137
3138.. COMMENT: === CONFIGURE_BDBUF_MAX_READ_AHEAD_BLOCKS ===
3139
3140.. _Maximum Blocks per Read-Ahead Request:
3141
3142Maximum Blocks per Read-Ahead Request
3143-------------------------------------
3144.. index:: CONFIGURE_BDBUF_MAX_READ_AHEAD_BLOCKS
3145
3146CONSTANT:
3147    ``CONFIGURE_BDBUF_MAX_READ_AHEAD_BLOCKS``
3148
3149DATA TYPE:
3150    Unsigned integer (``uint32_t``).
3151
3152RANGE:
3153    Positive.
3154
3155DEFAULT VALUE:
3156    The default value is 0.
3157
3158DESCRIPTION:
3159    Defines the maximum blocks per read-ahead request.
3160
3161NOTES:
3162    A value of 0 disables the read-ahead task (default).  The read-ahead task
3163    will issue speculative read transfers if a sequential access pattern is
3164    detected.  This can improve the performance on some systems.
3165
3166.. COMMENT: === CONFIGURE_BDBUF_MAX_WRITE_BLOCKS ===
3167
3168.. _Maximum Blocks per Write Request:
3169
3170Maximum Blocks per Write Request
3171--------------------------------
3172.. index:: CONFIGURE_BDBUF_MAX_WRITE_BLOCKS
3173
3174CONSTANT:
3175    ``CONFIGURE_BDBUF_MAX_WRITE_BLOCKS``
3176
3177DATA TYPE:
3178    Unsigned integer (``uint32_t``).
3179
3180RANGE:
3181    Positive.
3182
3183DEFAULT VALUE:
3184    The default value is 16.
3185
3186DESCRIPTION:
3187    Defines the maximum blocks per write request.
3188
3189NOTES:
3190    None.
3191
3192.. COMMENT: === CONFIGURE_BDBUF_TASK_STACK_SIZE ===
3193
3194.. _Task Stack Size of the Block Device Cache Tasks:
3195
3196Task Stack Size of the Block Device Cache Tasks
3197-----------------------------------------------
3198.. index:: CONFIGURE_BDBUF_TASK_STACK_SIZE
3199
3200CONSTANT:
3201    ``CONFIGURE_BDBUF_TASK_STACK_SIZE``
3202
3203DATA TYPE:
3204    Unsigned integer (``size_t``).
3205
3206RANGE:
3207    Zero or positive.
3208
3209DEFAULT VALUE:
3210    The default value is RTEMS_MINIMUM_STACK_SIZE.
3211
3212DESCRIPTION:
3213    Defines the task stack size of the Block Device Cache tasks in bytes.
3214
3215NOTES:
3216    None.
3217
3218.. COMMENT: === CONFIGURE_BDBUF_READ_AHEAD_TASK_PRIORITY ===
3219
3220.. _Read-Ahead Task Priority:
3221
3222Read-Ahead Task Priority
3223------------------------
3224.. index:: CONFIGURE_BDBUF_READ_AHEAD_TASK_PRIORITY
3225
3226CONSTANT:
3227    ``CONFIGURE_BDBUF_READ_AHEAD_TASK_PRIORITY``
3228
3229DATA TYPE:
3230    Task priority (``rtems_task_priority``).
3231
3232RANGE:
3233    Valid task priority.
3234
3235DEFAULT VALUE:
3236    The default value is 15.
3237
3238DESCRIPTION:
3239    Defines the read-ahead task priority.
3240
3241NOTES:
3242    None.
3243
3244.. COMMENT: === CONFIGURE_SWAPOUT_WORKER_TASKS ===
3245
3246.. _Swapout Worker Task Count:
3247
3248Swapout Worker Task Count
3249-------------------------
3250.. index:: CONFIGURE_SWAPOUT_WORKER_TASKS
3251
3252CONSTANT:
3253    ``CONFIGURE_SWAPOUT_WORKER_TASKS``
3254
3255DATA TYPE:
3256    Unsigned integer (``size_t``).
3257
3258RANGE:
3259    Zero or positive.
3260
3261DEFAULT VALUE:
3262    The default value is 0.
3263
3264DESCRIPTION:
3265    Defines the swapout worker task count.
3266
3267NOTES:
3268    None.
3269
3270.. COMMENT: === CONFIGURE_SWAPOUT_WORKER_TASK_PRIORITY ===
3271
3272.. _Swapout Worker Task Priority:
3273
3274Swapout Worker Task Priority
3275----------------------------
3276.. index:: CONFIGURE_SWAPOUT_WORKER_TASK_PRIORITY
3277
3278CONSTANT:
3279    ``CONFIGURE_SWAPOUT_WORKER_TASK_PRIORITY``
3280
3281DATA TYPE:
3282    Task priority (``rtems_task_priority``).
3283
3284RANGE:
3285    Valid task priority.
3286
3287DEFAULT VALUE:
3288    The default value is 15.
3289
3290DESCRIPTION:
3291    Defines the swapout worker task priority.
3292
3293NOTES:
3294    None.
3295
3296.. COMMENT: === BSP Specific Settings ===
3297
3298BSP Specific Settings
3299=====================
3300
3301This section describes BSP specific configuration settings used by
3302``<rtems/confdefs.h>``.  The BSP specific configuration settings are defined in
3303``<bsp.h>``.
3304
3305.. COMMENT: === Disable BSP Settings ===
3306
3307.. _Disable BSP Configuration Settings:
3308
3309Disable BSP Configuration Settings
3310----------------------------------
3311.. index:: CONFIGURE_DISABLE_BSP_SETTINGS
3312
3313CONSTANT:
3314    ``CONFIGURE_DISABLE_BSP_SETTINGS``
3315
3316DATA TYPE:
3317    Boolean feature macro.
3318
3319RANGE:
3320    Defined or undefined.
3321
3322DEFAULT VALUE:
3323    This is not defined by default.
3324
3325DESCRIPTION:
3326    All BSP specific configuration settings can be disabled by the application
3327    with the ``CONFIGURE_DISABLE_BSP_SETTINGS`` option.
3328
3329NOTES:
3330    None.
3331
3332.. COMMENT: === CONFIGURE_MALLOC_BSP_SUPPORTS_SBRK ===
3333
3334.. _Specify BSP Supports sbrk():
3335
3336Specify BSP Supports sbrk()
3337---------------------------
3338.. index:: CONFIGURE_MALLOC_BSP_SUPPORTS_SBRK
3339
3340CONSTANT:
3341    ``CONFIGURE_MALLOC_BSP_SUPPORTS_SBRK``
3342
3343DATA TYPE:
3344    Boolean feature macro.
3345
3346RANGE:
3347    Defined or undefined.
3348
3349DEFAULT VALUE:
3350    This option is BSP specific.
3351
3352DESCRIPTION:
3353    This configuration parameter is defined by a BSP to indicate that it does
3354    not allocate all available memory to the C Program Heap used by the Malloc
3355    Family of routines.
3356
3357    If defined, when ``malloc()`` is unable to allocate memory, it will call
3358    the BSP supplied ``sbrk()`` to obtain more memory.
3359
3360NOTES:
3361    This parameter should not be defined by the application. Only the BSP knows
3362    how it allocates memory to the C Program Heap.
3363
3364.. COMMENT: === BSP_IDLE_TASK_BODY ===
3365
3366.. _Specify BSP Specific Idle Task:
3367
3368Specify BSP Specific Idle Task
3369------------------------------
3370.. index:: BSP_IDLE_TASK_BODY
3371
3372CONSTANT:
3373    ``BSP_IDLE_TASK_BODY``
3374
3375DATA TYPE:
3376    Function pointer.
3377
3378RANGE:
3379    Undefined or valid function pointer.
3380
3381DEFAULT VALUE:
3382    This option is BSP specific.
3383
3384DESCRIPTION:
3385    If ``BSP_IDLE_TASK_BODY`` is defined by the BSP and
3386    ``CONFIGURE_IDLE_TASK_BODY`` is not defined by the application, then this
3387    BSP specific idle task body will be used.
3388
3389NOTES:
3390    As it has knowledge of the specific CPU model, system controller logic, and
3391    peripheral buses, a BSP specific IDLE task may be capable of turning
3392    components off to save power during extended periods of no task activity
3393
3394.. COMMENT: === BSP_IDLE_TASK_STACK_SIZE ===
3395
3396.. _Specify BSP Suggested Value for IDLE Task Stack Size:
3397
3398Specify BSP Suggested Value for IDLE Task Stack Size
3399----------------------------------------------------
3400.. index:: BSP_IDLE_TASK_STACK_SIZE
3401
3402CONSTANT:
3403    ``BSP_IDLE_TASK_STACK_SIZE``
3404
3405DATA TYPE:
3406    Unsigned integer (``size_t``).
3407
3408RANGE:
3409    Undefined or positive.
3410
3411DEFAULT VALUE:
3412    This option is BSP specific.
3413
3414DESCRIPTION:
3415    If ``BSP_IDLE_TASK_STACK_SIZE`` is defined by the BSP and
3416    ``CONFIGURE_IDLE_TASK_STACK_SIZE`` is not defined by the application, then
3417    this BSP suggested idle task stack size will be used.
3418
3419NOTES:
3420    The order of precedence for configuring the IDLE task stack size is:
3421
3422    - RTEMS default minimum stack size.
3423
3424    - If defined, then ``CONFIGURE_MINIMUM_TASK_STACK_SIZE``.
3425
3426    - If defined, then the BSP specific ``BSP_IDLE_TASK_SIZE``.
3427
3428    - If defined, then the application specified ``CONFIGURE_IDLE_TASK_SIZE``.
3429
3430.. COMMENT: XXX - add cross references to other related values.
3431
3432.. COMMENT: === BSP_INITIAL_EXTENSION ===
3433
3434.. _Specify BSP Specific User Extensions:
3435
3436Specify BSP Specific User Extensions
3437------------------------------------
3438.. index:: BSP_INITIAL_EXTENSION
3439
3440CONSTANT:
3441    ``BSP_INITIAL_EXTENSION``
3442
3443DATA TYPE:
3444    List of user extension initializers (``rtems_extensions_table``).
3445
3446RANGE:
3447    Undefined or a list of user extension initializers.
3448
3449DEFAULT VALUE:
3450    This option is BSP specific.
3451
3452DESCRIPTION:
3453    If ``BSP_INITIAL_EXTENSION`` is defined by the BSP, then this BSP specific
3454    initial extension will be placed as the last entry in the initial extension
3455    table.
3456
3457NOTES:
3458    None.
3459
3460.. COMMENT: === BSP_INTERRUPT_STACK_SIZE ===
3461
3462.. _Specifying BSP Specific Interrupt Stack Size:
3463
3464Specifying BSP Specific Interrupt Stack Size
3465--------------------------------------------
3466.. index:: BSP_INTERRUPT_STACK_SIZE
3467
3468CONSTANT:
3469    ``BSP_INTERRUPT_STACK_SIZE``
3470
3471DATA TYPE:
3472    Unsigned integer (``size_t``).
3473
3474RANGE:
3475    Undefined or positive.
3476
3477DEFAULT VALUE:
3478    This option is BSP specific.
3479
3480DESCRIPTION:
3481    If ``BSP_INTERRUPT_STACK_SIZE`` is defined by the BSP and
3482    ``CONFIGURE_INTERRUPT_STACK_SIZE`` is not defined by the application, then
3483    this BSP specific interrupt stack size will be used.
3484
3485NOTES:
3486    None.
3487
3488.. COMMENT: === BSP_MAXIMUM_DEVICES ===
3489
3490.. _Specifying BSP Specific Maximum Devices:
3491
3492Specifying BSP Specific Maximum Devices
3493---------------------------------------
3494.. index:: BSP_MAXIMUM_DEVICES
3495
3496CONSTANT:
3497    ``BSP_MAXIMUM_DEVICES``
3498
3499DATA TYPE:
3500    Unsigned integer (``size_t``).
3501
3502RANGE:
3503    Undefined or positive.
3504
3505DEFAULT VALUE:
3506    This option is BSP specific.
3507
3508DESCRIPTION:
3509    If ``BSP_MAXIMUM_DEVICES`` is defined by the BSP and
3510    ``CONFIGURE_MAXIMUM_DEVICES`` is not defined by the application, then this
3511    BSP specific maximum device count will be used.
3512
3513NOTES:
3514    This option is specific to the device file system (devFS) and should not be
3515    confused with the ``CONFIGURE_MAXIMUM_DRIVERS`` option.  This parameter
3516    only impacts the devFS and thus is only used by ``<rtems/confdefs.h>`` when
3517    ``CONFIGURE_USE_DEVFS_AS_BASE_FILESYSTEM`` is specified.
3518
3519.. COMMENT: === BSP_ZERO_WORKSPACE_AUTOMATICALLY ===
3520
3521.. _BSP Recommends RTEMS Workspace be Cleared:
3522
3523BSP Recommends RTEMS Workspace be Cleared
3524-----------------------------------------
3525.. index:: BSP_ZERO_WORKSPACE_AUTOMATICALLY
3526
3527CONSTANT:
3528    ``BSP_ZERO_WORKSPACE_AUTOMATICALLY``
3529
3530DATA TYPE:
3531    Boolean feature macro.
3532
3533RANGE:
3534    Defined or undefined.
3535
3536DEFAULT VALUE:
3537    This option is BSP specific.
3538
3539DESCRIPTION:
3540    If ``BSP_ZERO_WORKSPACE_AUTOMATICALLY`` is defined by the BSP and
3541    ``CONFIGURE_ZERO_WORKSPACE_AUTOMATICALLY`` is not defined by the
3542    application, then the workspace will be zeroed automatically.
3543
3544NOTES:
3545    Zeroing memory can add significantly to system boot time. It is not
3546    necessary for RTEMS but is often assumed by support libraries.
3547
3548.. COMMENT: === CONFIGURE_BSP_PREREQUISITE_DRIVERS ===
3549
3550.. _Specify BSP Prerequisite Drivers:
3551
3552Specify BSP Prerequisite Drivers
3553--------------------------------
3554.. index:: CONFIGURE_BSP_PREREQUISITE_DRIVERS
3555
3556CONSTANT:
3557    ``CONFIGURE_BSP_PREREQUISITE_DRIVERS``
3558
3559DATA TYPE:
3560    List of device driver initializers (``rtems_driver_address_table``).
3561
3562RANGE:
3563    Undefined or array of device drivers.
3564
3565DEFAULT VALUE:
3566    This option is BSP specific.
3567
3568DESCRIPTION:
3569    ``CONFIGURE_BSP_PREREQUISITE_DRIVERS`` is defined if the BSP has device
3570    drivers it needs to include in the Device Driver Table.  This should be
3571    defined to the set of device driver entries that will be placed in the
3572    table at the *FRONT* of the Device Driver Table and initialized before any
3573    other drivers *INCLUDING* any application prerequisite drivers.
3574
3575NOTES:
3576    ``CONFIGURE_BSP_PREREQUISITE_DRIVERS`` is typically used by BSPs to
3577    configure common infrastructure such as bus controllers or probe for
3578    devices.
3579
3580.. COMMENT: === Idle Task Configuration ===
3581
3582Idle Task Configuration
3583=======================
3584
3585This section defines the IDLE task related configuration parameters supported
3586by ``<rtems/confdefs.h>``.
3587
3588.. COMMENT: === CONFIGURE_IDLE_TASK_BODY ===
3589
3590.. _Specify Application Specific Idle Task Body:
3591
3592Specify Application Specific Idle Task Body
3593-------------------------------------------
3594.. index:: CONFIGURE_IDLE_TASK_BODY
3595
3596CONSTANT:
3597    ``CONFIGURE_IDLE_TASK_BODY``
3598
3599DATA TYPE:
3600    Function pointer.
3601
3602RANGE:
3603    Undefined or valid function pointer.
3604
3605DEFAULT VALUE:
3606    This is not defined by default.
3607
3608DESCRIPTION:
3609    ``CONFIGURE_IDLE_TASK_BODY`` is set to the function name corresponding to
3610    the application specific IDLE thread body.  If not specified, the BSP or
3611    RTEMS default IDLE thread body will be used.
3612
3613NOTES:
3614    None.
3615
3616.. COMMENT: === CONFIGURE_IDLE_TASK_STACK_SIZE ===
3617
3618.. _Specify Idle Task Stack Size:
3619
3620Specify Idle Task Stack Size
3621----------------------------
3622.. index:: CONFIGURE_IDLE_TASK_STACK_SIZE
3623
3624CONSTANT:
3625    ``CONFIGURE_IDLE_TASK_STACK_SIZE``
3626
3627DATA TYPE:
3628    Unsigned integer (``size_t``).
3629
3630RANGE:
3631    Undefined or positive.
3632
3633DEFAULT VALUE:
3634    The default value is RTEMS_MINIMUM_STACK_SIZE.
3635
3636DESCRIPTION:
3637    ``CONFIGURE_IDLE_TASK_STACK_SIZE`` is set to the desired stack size for the
3638    IDLE task.
3639
3640NOTES:
3641    None.
3642
3643.. COMMENT: === CONFIGURE_IDLE_TASK_INITIALIZES_APPLICATION ===
3644
3645.. _Specify Idle Task Performs Application Initialization:
3646
3647Specify Idle Task Performs Application Initialization
3648-----------------------------------------------------
3649.. index:: CONFIGURE_IDLE_TASK_INITIALIZES_APPLICATION
3650
3651CONSTANT:
3652    ``CONFIGURE_IDLE_TASK_INITIALIZES_APPLICATION``
3653
3654DATA TYPE:
3655    Boolean feature macro.
3656
3657RANGE:
3658    Defined or undefined.
3659
3660DEFAULT VALUE:
3661    This is not defined by default, the user is assumed to provide one or more
3662    initialization tasks.
3663
3664DESCRIPTION:
3665    ``CONFIGURE_IDLE_TASK_INITIALIZES_APPLICATION`` is set to indicate that the
3666    user has configured *NO* user initialization tasks or threads and that the
3667    user provided IDLE task will perform application initialization and then
3668    transform itself into an IDLE task.
3669
3670NOTES:
3671    If you use this option be careful, the user IDLE task *CANNOT* block at all
3672    during the initialization sequence.  Further, once application
3673    initialization is complete, it must make itself preemptible and enter an
3674    IDLE body loop.
3675
3676    The IDLE task must run at the lowest priority of all tasks in the system.
3677
3678.. COMMENT: === Scheduler Algorithm Configuration ===
3679
3680Scheduler Algorithm Configuration
3681=================================
3682
3683This section defines the configuration parameters related to selecting a
3684scheduling algorithm for an application.  For the schedulers built into RTEMS,
3685the configuration is straightforward.  All that is required is to define the
3686configuration macro which specifies which scheduler you want for in your
3687application.  The currently available schedulers are:
3688
3689The pluggable scheduler interface also enables the user to provide their own
3690scheduling algorithm.  If you choose to do this, you must define multiple
3691configuration macros.
3692
3693.. COMMENT: === CONFIGURE_SCHEDULER_PRIORITY ===
3694
3695.. _Use Deterministic Priority Scheduler:
3696
3697Use Deterministic Priority Scheduler
3698------------------------------------
3699.. index:: CONFIGURE_SCHEDULER_PRIORITY
3700
3701CONSTANT:
3702    ``CONFIGURE_SCHEDULER_PRIORITY``
3703
3704DATA TYPE:
3705    Boolean feature macro.
3706
3707RANGE:
3708    Defined or undefined.
3709
3710DEFAULT VALUE:
3711    This is defined by default.  This is the default scheduler and specifying
3712    this configuration parameter is redundant.
3713
3714DESCRIPTION:
3715    The Deterministic Priority Scheduler is the default scheduler in RTEMS for
3716    uni-processor applications and is designed for predictable performance
3717    under the highest loads.  It can block or unblock a thread in a constant
3718    amount of time.  This scheduler requires a variable amount of memory based
3719    upon the number of priorities configured in the system.
3720
3721NOTES:
3722    This scheduler may be explicitly selected by defining
3723    ``CONFIGURE_SCHEDULER_PRIORITY`` although this is equivalent to the default
3724    behavior.
3725
3726.. COMMENT: === CONFIGURE_SCHEDULER_SIMPLE ===
3727
3728.. _Use Simple Priority Scheduler:
3729
3730Use Simple Priority Scheduler
3731-----------------------------
3732.. index:: CONFIGURE_SCHEDULER_SIMPLE
3733
3734CONSTANT:
3735    ``CONFIGURE_SCHEDULER_SIMPLE``
3736
3737DATA TYPE:
3738    Boolean feature macro.
3739
3740RANGE:
3741    Defined or undefined.
3742
3743DEFAULT VALUE:
3744    This is not defined by default.
3745
3746DESCRIPTION:
3747    When defined, the Simple Priority Scheduler is used at the thread
3748    scheduling algorithm. This is an alternative scheduler in RTEMS.  It is
3749    designed to provide the same task scheduling behaviour as the Deterministic
3750    Priority Scheduler while being simpler in implementation and uses less
3751    memory for data management.  It maintains a single sorted list of all ready
3752    threads.  Thus blocking or unblocking a thread is not a constant time
3753    operation with this scheduler.
3754
3755    This scheduler may be explicitly selected by defining
3756    ``CONFIGURE_SCHEDULER_SIMPLE``.
3757
3758NOTES:
3759    This scheduler is appropriate for use in small systems where RAM is limited.
3760
3761.. COMMENT: === CONFIGURE_SCHEDULER_EDF ===
3762
3763.. _Use Earliest Deadline First Scheduler:
3764
3765Use Earliest Deadline First Scheduler
3766-------------------------------------
3767.. index:: CONFIGURE_SCHEDULER_EDF
3768
3769CONSTANT:
3770    ``CONFIGURE_SCHEDULER_EDF``
3771
3772DATA TYPE:
3773    Boolean feature macro.
3774
3775RANGE:
3776    Defined or undefined.
3777
3778DEFAULT VALUE:
3779    This is not defined by default.
3780
3781DESCRIPTION:
3782    The Earliest Deadline First Scheduler (EDF) is an alternative scheduler in
3783    RTEMS for uni-processor applications. The EDF schedules tasks with dynamic
3784    priorities equal to deadlines. The deadlines are declared using only Rate
3785    Monotonic manager which handles periodic behavior.  Period is always equal
3786    to deadline. If a task does not have any deadline declared or the deadline
3787    is cancelled, the task is considered a background task which is scheduled
3788    in case no deadline-driven tasks are ready to run.  Moreover, multiple
3789    background tasks are scheduled according their priority assigned upon
3790    initialization. All ready tasks reside in a single ready queue.
3791
3792    This scheduler may be explicitly selected by defining
3793    ``CONFIGURE_SCHEDULER_EDF``.
3794
3795NOTES:
3796    None.
3797
3798.. COMMENT: === CONFIGURE_SCHEDULER_EDF_SMP ===
3799
3800.. _Use Earliest Deadline First SMP Scheduler:
3801
3802Use Earliest Deadline First Scheduler
3803-------------------------------------
3804.. index:: CONFIGURE_SCHEDULER_EDF_SMP
3805
3806CONSTANT:
3807    ``CONFIGURE_SCHEDULER_EDF_SMP``
3808
3809DATA TYPE:
3810    Boolean feature macro.
3811
3812RANGE:
3813    Defined or undefined.
3814
3815DEFAULT VALUE:
3816    This is not defined by default.
3817
3818DESCRIPTION:
3819    If defined, then the Earliest Deadline First (EDF) SMP Scheduler is
3820    selected as the default scheduler.
3821
3822NOTES:
3823    None.
3824
3825.. COMMENT: === CONFIGURE_SCHEDULER_CBS ===
3826
3827.. _Use Constant Bandwidth Server Scheduler:
3828
3829Use Constant Bandwidth Server Scheduler
3830---------------------------------------
3831.. index:: CONFIGURE_SCHEDULER_CBS
3832
3833CONSTANT:
3834    ``CONFIGURE_SCHEDULER_CBS``
3835
3836DATA TYPE:
3837    Boolean feature macro.
3838
3839RANGE:
3840    Defined or undefined.
3841
3842DEFAULT VALUE:
3843    This is not defined by default.
3844
3845DESCRIPTION:
3846    The Constant Bandwidth Server Scheduler (CBS) is an alternative scheduler
3847    in RTEMS for uni-processor applications. The CBS is a budget aware
3848    extension of EDF scheduler. The goal of this scheduler is to ensure
3849    temporal isolation of tasks. The CBS is equipped with a set of additional
3850    rules and provides with an extensive API.
3851
3852    This scheduler may be explicitly selected by defining
3853    ``CONFIGURE_SCHEDULER_CBS``.
3854
3855.. COMMENT: XXX - add cross reference to API chapter
3856
3857NOTES:
3858    None.
3859
3860.. COMMENT: === CONFIGURE_SCHEDULER_PRIORITY_SMP ===
3861
3862.. _Use Deterministic Priority SMP Scheduler:
3863
3864Use Deterministic Priority SMP Scheduler
3865----------------------------------------
3866.. index:: CONFIGURE_SCHEDULER_PRIORITY_SMP
3867
3868CONSTANT:
3869    ``CONFIGURE_SCHEDULER_PRIORITY_SMP``
3870
3871DATA TYPE:
3872    Boolean feature macro.
3873
3874RANGE:
3875    Defined or undefined.
3876
3877DEFAULT VALUE:
3878    This is not defined by default.
3879
3880DESCRIPTION:
3881    The Deterministic Priority SMP Scheduler is derived from the Deterministic
3882    Priority Scheduler but is capable of scheduling threads across multiple
3883    processors.
3884
3885    In a configuration with SMP enabled at configure time, it may be explicitly
3886    selected by defining ``CONFIGURE_SCHEDULER_PRIORITY_SMP``.
3887
3888NOTES:
3889    This scheduler is only available when RTEMS is configured with SMP support
3890    enabled.
3891
3892    This scheduler is currently the default in SMP configurations and is only
3893    selected when ``CONFIGURE_MAXIMUM_PROCESSORS`` is greater than one.
3894
3895.. COMMENT: === CONFIGURE_SCHEDULER_SIMPLE_SMP ===
3896
3897.. _Use Simple SMP Priority Scheduler:
3898
3899Use Simple SMP Priority Scheduler
3900---------------------------------
3901.. index:: CONFIGURE_SCHEDULER_SIMPLE_SMP
3902
3903CONSTANT:
3904    ``CONFIGURE_SCHEDULER_SIMPLE_SMP``
3905
3906DATA TYPE:
3907    Boolean feature macro.
3908
3909RANGE:
3910    Defined or undefined.
3911
3912DEFAULT VALUE:
3913    This is not defined by default.
3914
3915DESCRIPTION:
3916    The Simple SMP Priority Scheduler is derived from the Simple Priority
3917    Scheduler but is capable of scheduling threads across multiple processors.
3918    It is designed to provide the same task scheduling behaviour as the
3919    Deterministic Priority Scheduler while distributing threads across multiple
3920    processors.  Being based upon the Simple Priority Scheduler, it also
3921    maintains a single sorted list of all ready threads.  Thus blocking or
3922    unblocking a thread is not a constant time operation with this scheduler.
3923
3924    In addition, when allocating threads to processors, the algorithm is not
3925    constant time. This algorithm was not designed with efficiency as a primary
3926    design goal.  Its primary design goal was to provide an SMP-aware
3927    scheduling algorithm that is simple to understand.
3928
3929    In a configuration with SMP enabled at configure time, it may be explicitly
3930    selected by defining ``CONFIGURE_SCHEDULER_SIMPLE_SMP``.
3931
3932NOTES:
3933    This scheduler is only available when RTEMS is configured with SMP support
3934    enabled.
3935
3936.. COMMENT: === Configuring a Scheduler Name ===
3937
3938.. _Configuring a Scheduler Name:
3939
3940Configuring a Scheduler Name
3941----------------------------
3942.. index:: CONFIGURE_SCHEDULER_NAME
3943
3944CONSTANT:
3945    ``CONFIGURE_SCHEDULER_NAME``
3946
3947DATA TYPE:
3948    RTEMS Name (``rtems_name``).
3949
3950RANGE:
3951    Any value.
3952
3953DEFAULT VALUE:
3954    The default name is
3955      - ``"UCBS"`` for the Uni-Processor CBS scheduler,
3956      - ``"UEDF"`` for the Uni-Processor EDF scheduler,
3957      - ``"UPD "`` for the Uni-Processor Deterministic Priority scheduler,
3958      - ``"UPS "`` for the Uni-Processor Simple Priority scheduler,
3959      - ``"MPA "`` for the Multi-Processor Priority Affinity scheduler, and
3960      - ``"MPD "`` for the Multi-Processor Deterministic Priority scheduler, and
3961      - ``"MPS "`` for the Multi-Processor Simple Priority scheduler.
3962
3963DESCRIPTION:
3964    Schedulers can be identified via ``rtems_scheduler_ident``.  The name of
3965    the scheduler is determined by the configuration.
3966
3967NOTES:
3968    None.
3969
3970.. COMMENT: === Configuring a User Scheduler ===
3971
3972.. _Configuring a User Provided Scheduler:
3973
3974Configuring a User Provided Scheduler
3975-------------------------------------
3976.. index:: CONFIGURE_SCHEDULER_USER
3977
3978CONSTANT:
3979    ``CONFIGURE_SCHEDULER_USER``
3980
3981DATA TYPE:
3982    Boolean feature macro.
3983
3984RANGE:
3985    Defined or undefined.
3986
3987DEFAULT VALUE:
3988    This is not defined by default.
3989
3990DESCRIPTION:
3991    RTEMS allows the application to provide its own task/thread scheduling
3992    algorithm. In order to do this, one must define
3993    ``CONFIGURE_SCHEDULER_USER`` to indicate the application provides its own
3994    scheduling algorithm. If ``CONFIGURE_SCHEDULER_USER`` is defined then the
3995    following additional macros must be defined:
3996
3997    - ``CONFIGURE_SCHEDULER_CONTEXT`` must be defined to a static definition of
3998      the scheduler context of the user scheduler.
3999
4000    - ``CONFIGURE_SCHEDULER_CONTROLS`` must be defined to a scheduler control
4001      initializer for the user scheduler.
4002
4003    - ``CONFIGURE_SCHEDULER_USER_PER_THREAD`` must be defined to the type of
4004      the per-thread information of the user scheduler.
4005
4006NOTES:
4007    At this time, the mechanics and requirements for writing a new scheduler
4008    are evolving and not fully documented.  It is recommended that you look at
4009    the existing Deterministic Priority Scheduler in
4010    ``cpukit/score/src/schedulerpriority*.c`` for guidance.  For guidance on
4011    the configuration macros, please examine ``cpukit/sapi/include/confdefs.h``
4012    for how these are defined for the Deterministic Priority Scheduler.
4013
4014.. COMMENT: === Configuring Clustered Schedulers ===
4015
4016.. _Configuring Clustered Schedulers:
4017
4018Configuring Clustered Schedulers
4019--------------------------------
4020
4021Clustered scheduling helps to control the worst-case latencies in a
4022multi-processor system.  The goal is to reduce the amount of shared state in
4023the system and thus prevention of lock contention.  Modern multi-processor
4024systems tend to have several layers of data and instruction caches.  With
4025clustered scheduling it is possible to honour the cache topology of a system
4026and thus avoid expensive cache synchronization traffic.
4027
4028We have clustered scheduling in case the set of processors of a system is
4029partitioned into non-empty pairwise-disjoint subsets.  These subsets are called
4030clusters.  Clusters with a cardinality of one are partitions.  Each cluster is
4031owned by exactly one scheduler instance.  In order to use clustered scheduling
4032the application designer has to answer two questions.
4033
4034#. How is the set of processors partitioned into clusters?
4035
4036#. Which scheduler is used for which cluster?
4037
4038CONFIGURATION:
4039    The schedulers in an SMP system are statically configured on RTEMS.
4040    Firstly the application must select which scheduling algorithms are
4041    available with the following defines
4042
4043    - ``CONFIGURE_SCHEDULER_PRIORITY_SMP``,
4044
4045    - ``CONFIGURE_SCHEDULER_SIMPLE_SMP``, and
4046
4047    - ``CONFIGURE_SCHEDULER_PRIORITY_AFFINITY_SMP``.
4048
4049    This is necessary to calculate the per-thread overhead introduced by the
4050    schedulers.  After these definitions the configuration file must ``#include
4051    <rtems/scheduler.h>`` to have access to scheduler specific configuration
4052    macros.  Each scheduler needs a context to store state information at
4053    run-time.  To provide a context for each scheduler is the next step.  Use
4054    the following macros to create scheduler contexts
4055
4056    - ``RTEMS_SCHEDULER_CONTEXT_PRIORITY_SMP(name, prio_count)``,
4057
4058    - ``RTEMS_SCHEDULER_CONTEXT_SIMPLE_SMP(name)``, and
4059
4060    - ``RTEMS_SCHEDULER_CONTEXT_PRIORITY_AFFINITY_SMP(name, prio_count)``.
4061
4062    The ``name`` parameter is used as part of a designator for a global
4063    variable, so the usual C/C++ designator rules apply.  Additional parameters
4064    are scheduler specific.  The schedulers are registered in the system via
4065    the scheduler table.  To create the scheduler table define
4066    ``CONFIGURE_SCHEDULER_CONTROLS`` to a list of the following scheduler
4067    control initializers
4068
4069    - ``RTEMS_SCHEDULER_CONTROL_PRIORITY_SMP(name, obj_name)``,
4070
4071    - ``RTEMS_SCHEDULER_CONTROL_SIMPLE_SMP(name, obj_name)``, and
4072
4073    - ``RTEMS_SCHEDULER_CONTROL_PRIORITY_AFFINITY_SMP(name, obj_name)``.
4074
4075    The ``name`` parameter must correspond to the parameter defining the
4076    scheduler context.  The ``obj_name`` determines the scheduler object name
4077    and can be used in ``rtems_scheduler_ident()`` to get the scheduler object
4078    identifier.
4079
4080    The last step is to define which processor uses which scheduler.  For this
4081    purpose a scheduler assignment table must be defined.  The entry count of
4082    this table must be equal to the configured maximum processors
4083    (``CONFIGURE_MAXIMUM_PROCESSORS``).  A processor assignment to a
4084    scheduler can be optional or mandatory.  The boot processor must have a
4085    scheduler assigned.  In case the system needs more mandatory processors
4086    than available then a fatal run-time error will occur.  To specify the
4087    scheduler assignments define ``CONFIGURE_SMP_SCHEDULER_ASSIGNMENTS`` to a
4088    list of ``RTEMS_SCHEDULER_ASSIGN(index, attr)`` and
4089    ``RTEMS_SCHEDULER_ASSIGN_NO_SCHEDULER`` macros.  The ``index`` parameter
4090    must be a valid index into the scheduler table.  The ``attr`` parameter
4091    defines the scheduler assignment attributes.  By default a scheduler
4092    assignment to a processor is optional.  For the scheduler assignment
4093    attribute use one of the mutually exclusive variants
4094
4095    - ``RTEMS_SCHEDULER_ASSIGN_DEFAULT``,
4096
4097    - ``RTEMS_SCHEDULER_ASSIGN_PROCESSOR_MANDATORY``, and
4098
4099    - ``RTEMS_SCHEDULER_ASSIGN_PROCESSOR_OPTIONAL``.
4100
4101    It is possible to add/remove processors to/from scheduler instances at
4102    run-time, see :ref:`rtems_scheduler_add_processor` and
4103    :ref:`rtems_scheduler_remove_processor`.
4104
4105ERRORS:
4106    In case one of the scheduler indices
4107    in``CONFIGURE_SMP_SCHEDULER_ASSIGNMENTS`` is invalid a link-time error will
4108    occur with an undefined reference to ``RTEMS_SCHEDULER_INVALID_INDEX``.
4109
4110    Some fatal errors may occur in case of scheduler configuration
4111    inconsistencies or a lack of processors on the system.  The fatal source is
4112    ``RTEMS_FATAL_SOURCE_SMP``.  None of the errors is internal.
4113
4114    - ``SMP_FATAL_BOOT_PROCESSOR_NOT_ASSIGNED_TO_SCHEDULER`` - the boot
4115      processor must have a scheduler assigned.
4116
4117    - ``SMP_FATAL_MANDATORY_PROCESSOR_NOT_PRESENT`` - there exists a mandatory
4118      processor beyond the range of physically or virtually available
4119      processors.  The processor demand must be reduced for this system.
4120
4121    - ``SMP_FATAL_START_OF_MANDATORY_PROCESSOR_FAILED`` - the start of a
4122      mandatory processor failed during system initialization.  The system may
4123      not have this processor at all or it could be a problem with a boot
4124      loader for example.  Check the ``CONFIGURE_SMP_SCHEDULER_ASSIGNMENTS``
4125      definition.
4126
4127    - ``SMP_FATAL_MULTITASKING_START_ON_UNASSIGNED_PROCESSOR`` - it is not
4128      allowed to start multitasking on a processor with no scheduler assigned.
4129
4130EXAMPLE:
4131    The following example shows a scheduler configuration for a hypothetical
4132    product using two chip variants.  One variant has four processors which is
4133    used for the normal product line and another provides eight processors for
4134    the high-performance product line.  The first processor performs hard-real
4135    time control of actuators and sensors.  The second processor is not used by
4136    RTEMS at all and runs a Linux instance to provide a graphical user
4137    interface.  The additional processors are used for a worker thread pool to
4138    perform data processing operations.
4139
4140    The processors managed by RTEMS use two Deterministic Priority scheduler
4141    instances capable of dealing with 256 priority levels.  The scheduler with
4142    index zero has the name ``"IO "``.  The scheduler with index one has the
4143    name ``"WORK"``.  The scheduler assignments of the first, third and fourth
4144    processor are mandatory, so the system must have at least four processors,
4145    otherwise a fatal run-time error will occur during system startup.  The
4146    processor assignments for the fifth up to the eighth processor are optional
4147    so that the same application can be used for the normal and
4148    high-performance product lines.  The second processor has no scheduler
4149    assigned and runs Linux.  A hypervisor will ensure that the two systems
4150    cannot interfere in an undesirable way.
4151
4152    .. code-block:: c
4153
4154        #define CONFIGURE_MAXIMUM_PROCESSORS 8
4155        #define CONFIGURE_MAXIMUM_PRIORITY 255
4156
4157        /* Make the scheduler algorithm available */
4158        #define CONFIGURE_SCHEDULER_PRIORITY_SMP
4159        #include <rtems/scheduler.h>
4160
4161        /* Create contexts for the two scheduler instances */
4162        RTEMS_SCHEDULER_CONTEXT_PRIORITY_SMP(io, CONFIGURE_MAXIMUM_PRIORITY + 1);
4163        RTEMS_SCHEDULER_CONTEXT_PRIORITY_SMP(work, CONFIGURE_MAXIMUM_PRIORITY + 1);
4164
4165        /* Define the scheduler table */
4166        #define CONFIGURE_SCHEDULER_CONTROLS \\
4167            RTEMS_SCHEDULER_CONTROL_PRIORITY_SMP( \
4168                io, \
4169                rtems_build_name('I', 'O', ' ', ' ') \
4170            ), \
4171            RTEMS_SCHEDULER_CONTROL_PRIORITY_SMP( \
4172                work, \
4173                rtems_build_name('W', 'O', 'R', 'K') \
4174            )
4175
4176        /* Define the initial processor to scheduler assignments */
4177        #define CONFIGURE_SMP_SCHEDULER_ASSIGNMENTS \
4178            RTEMS_SCHEDULER_ASSIGN(0, RTEMS_SCHEDULER_ASSIGN_PROCESSOR_MANDATORY), \
4179            RTEMS_SCHEDULER_ASSIGN_NO_SCHEDULER, \
4180            RTEMS_SCHEDULER_ASSIGN(1, RTEMS_SCHEDULER_ASSIGN_PROCESSOR_MANDATORY), \
4181            RTEMS_SCHEDULER_ASSIGN(1, RTEMS_SCHEDULER_ASSIGN_PROCESSOR_MANDATORY), \
4182            RTEMS_SCHEDULER_ASSIGN(1, RTEMS_SCHEDULER_ASSIGN_PROCESSOR_OPTIONAL), \
4183            RTEMS_SCHEDULER_ASSIGN(1, RTEMS_SCHEDULER_ASSIGN_PROCESSOR_OPTIONAL), \
4184            RTEMS_SCHEDULER_ASSIGN(1, RTEMS_SCHEDULER_ASSIGN_PROCESSOR_OPTIONAL), \
4185            RTEMS_SCHEDULER_ASSIGN(1, RTEMS_SCHEDULER_ASSIGN_PROCESSOR_OPTIONAL)
4186
4187.. COMMENT: === Device Driver Table ===
4188
4189Device Driver Table
4190===================
4191
4192This section defines the configuration parameters related to the automatic
4193generation of a Device Driver Table.  As ``<rtems/confdefs.h>`` only is aware
4194of a small set of standard device drivers, the generated Device Driver Table is
4195suitable for simple applications with no custom device drivers.
4196
4197Note that network device drivers are not configured in the Device Driver Table.
4198
4199.. COMMENT: === CONFIGURE_MAXIMUM_DRIVERS ===
4200
4201.. _Specifying the Maximum Number of Device Drivers:
4202
4203Specifying the Maximum Number of Device Drivers
4204-----------------------------------------------
4205.. index:: CONFIGURE_MAXIMUM_DRIVERS
4206
4207CONSTANT:
4208
4209    ``CONFIGURE_MAXIMUM_DRIVERS``
4210
4211DATA TYPE:
4212    Unsigned integer (``uint32_t``).
4213
4214RANGE:
4215    Zero or positive.
4216
4217DEFAULT VALUE:
4218    This is computed by default, and is set to the number of device drivers
4219    configured using the ``CONFIGURE_APPLICATIONS_NEEDS_XXX_DRIVER``
4220    configuration parameters.
4221
4222DESCRIPTION:
4223    ``CONFIGURE_MAXIMUM_DRIVERS`` is defined as the number of device drivers
4224    per node.
4225
4226NOTES:
4227    If the application will dynamically install device drivers, then this
4228    configuration parameter must be larger than the number of statically
4229    configured device drivers. Drivers configured using the
4230    ``CONFIGURE_APPLICATIONS_NEEDS_XXX_DRIVER`` configuration parameters are
4231    statically installed.
4232
4233.. COMMENT: === CONFIGURE_APPLICATION_NEEDS_CONSOLE_DRIVER ===
4234
4235.. _Enable Console Device Driver:
4236
4237Enable Console Device Driver
4238----------------------------
4239.. index:: CONFIGURE_APPLICATION_NEEDS_CONSOLE_DRIVER
4240
4241CONSTANT:
4242    ``CONFIGURE_APPLICATION_NEEDS_CONSOLE_DRIVER``
4243
4244DATA TYPE:
4245    Boolean feature macro.
4246
4247RANGE:
4248    Defined or undefined.
4249
4250DEFAULT VALUE:
4251    This is not defined by default.
4252
4253DESCRIPTION:
4254    ``CONFIGURE_APPLICATION_NEEDS_CONSOLE_DRIVER`` is defined if the
4255    application wishes to include the Console Device Driver.
4256
4257NOTES:
4258    This device driver is responsible for providing standard input and output
4259    using */dev/console*.
4260
4261    BSPs should be constructed in a manner that allows ``printk()`` to work
4262    properly without the need for the console driver to be configured.
4263
4264.. COMMENT: === CONFIGURE_APPLICATION_NEEDS_CLOCK_DRIVER ===
4265
4266.. _Enable Clock Driver:
4267
4268Enable Clock Driver
4269-------------------
4270.. index:: CONFIGURE_APPLICATION_NEEDS_CLOCK_DRIVER
4271
4272CONSTANT:
4273    ``CONFIGURE_APPLICATION_NEEDS_CLOCK_DRIVER``
4274
4275DATA TYPE:
4276    Boolean feature macro.
4277
4278RANGE:
4279    Defined or undefined.
4280
4281DEFAULT VALUE:
4282    This is not defined by default.
4283
4284DESCRIPTION:
4285    ``CONFIGURE_APPLICATION_NEEDS_CLOCK_DRIVER`` is defined if the application
4286    wishes to include the Clock Device Driver.
4287
4288NOTES:
4289    This device driver is responsible for providing a regular interrupt which
4290    invokes a clock tick directive.
4291
4292    If neither the Clock Driver not Benchmark Timer is enabled and the
4293    configuration parameter
4294    ``CONFIGURE_APPLICATION_DOES_NOT_NEED_CLOCK_DRIVER`` is not defined, then a
4295    compile time error will occur.
4296
4297.. COMMENT: === CONFIGURE_APPLICATION_NEEDS_TIMER_DRIVER ===
4298
4299.. _Enable the Benchmark Timer Driver:
4300
4301Enable the Benchmark Timer Driver
4302---------------------------------
4303.. index:: CONFIGURE_APPLICATION_NEEDS_TIMER_DRIVER
4304
4305CONSTANT:
4306    ``CONFIGURE_APPLICATION_NEEDS_TIMER_DRIVER``
4307
4308DATA TYPE:
4309    Boolean feature macro.
4310
4311RANGE:
4312    Defined or undefined.
4313
4314DEFAULT VALUE:
4315    This is not defined by default.
4316
4317DESCRIPTION:
4318    ``CONFIGURE_APPLICATION_NEEDS_TIMER_DRIVER`` is defined if the application
4319    wishes to include the Timer Driver.  This device driver is used to
4320    benchmark execution times by the RTEMS Timing Test Suites.
4321
4322NOTES:
4323    If neither the Clock Driver not Benchmark Timer is enabled and the
4324    configuration parameter
4325    ``CONFIGURE_APPLICATION_DOES_NOT_NEED_CLOCK_DRIVER`` is not defined, then a
4326    compile time error will occur.
4327
4328.. COMMENT: === CONFIGURE_APPLICATION_DOES_NOT_NEED_CLOCK_DRIVER ===
4329
4330.. _Specify Clock and Benchmark Timer Drivers Are Not Needed:
4331
4332Specify Clock and Benchmark Timer Drivers Are Not Needed
4333--------------------------------------------------------
4334.. index:: CONFIGURE_APPLICATION_DOES_NOT_NEED_CLOCK_DRIVER
4335
4336CONSTANT:
4337    ``CONFIGURE_APPLICATION_DOES_NOT_NEED_CLOCK_DRIVER``
4338
4339DATA TYPE:
4340    Boolean feature macro.
4341
4342RANGE:
4343    Defined or undefined.
4344
4345DEFAULT VALUE:
4346    This is not defined by default.
4347
4348DESCRIPTION:
4349    ``CONFIGURE_APPLICATION_DOES_NOT_NEED_CLOCK_DRIVER`` is defined when the
4350    application does *NOT* want the Clock Device Driver and is *NOT* using the
4351    Timer Driver.  The inclusion or exclusion of the Clock Driver must be
4352    explicit in user applications.
4353
4354NOTES:
4355    This configuration parameter is intended to prevent the common user error
4356    of using the Hello World example as the baseline for an application and
4357    leaving out a clock tick source.
4358
4359.. COMMENT: === CONFIGURE_APPLICATION_NEEDS_RTC_DRIVER ===
4360
4361.. _Enable Real-Time Clock Driver:
4362
4363Enable Real-Time Clock Driver
4364-----------------------------
4365.. index:: CONFIGURE_APPLICATION_NEEDS_RTC_DRIVER
4366
4367CONSTANT:
4368    ``CONFIGURE_APPLICATION_NEEDS_RTC_DRIVER``
4369
4370DATA TYPE:
4371    Boolean feature macro.
4372
4373RANGE:
4374    Defined or undefined.
4375
4376DEFAULT VALUE:
4377    This is not defined by default.
4378
4379DESCRIPTION:
4380    ``CONFIGURE_APPLICATION_NEEDS_RTC_DRIVER`` is defined if the application
4381    wishes to include the Real-Time Clock Driver.
4382
4383NOTES:
4384    Most BSPs do not include support for a real-time clock. This is because
4385    many boards do not include the required hardware.
4386
4387    If this is defined and the BSP does not have this device driver, then the
4388    user will get a link time error for an undefined symbol.
4389
4390.. COMMENT: === CONFIGURE_APPLICATION_NEEDS_WATCHDOG_DRIVER ===
4391
4392.. _Enable the Watchdog Device Driver:
4393
4394Enable the Watchdog Device Driver
4395---------------------------------
4396.. index:: CONFIGURE_APPLICATION_NEEDS_WATCHDOG_DRIVER
4397
4398CONSTANT:
4399    ``CONFIGURE_APPLICATION_NEEDS_WATCHDOG_DRIVER``
4400
4401DATA TYPE:
4402    Boolean feature macro.
4403
4404RANGE:
4405    Defined or undefined.
4406
4407DEFAULT VALUE:
4408    This is not defined by default.
4409
4410DESCRIPTION:
4411    ``CONFIGURE_APPLICATION_NEEDS_WATCHDOG_DRIVER`` is defined if the
4412    application wishes to include the Watchdog Driver.
4413
4414NOTES:
4415    Most BSPs do not include support for a watchdog device driver. This is
4416    because many boards do not include the required hardware.
4417
4418    If this is defined and the BSP does not have this device driver, then the
4419    user will get a link time error for an undefined symbol.
4420
4421.. COMMENT: === CONFIGURE_APPLICATION_NEEDS_FRAME_BUFFER_DRIVER ===
4422
4423.. _Enable the Graphics Frame Buffer Device Driver:
4424
4425Enable the Graphics Frame Buffer Device Driver
4426----------------------------------------------
4427.. index:: CONFIGURE_APPLICATION_NEEDS_FRAME_BUFFER_DRIVER
4428
4429CONSTANT:
4430    ``CONFIGURE_APPLICATION_NEEDS_FRAME_BUFFER_DRIVER``
4431
4432DATA TYPE:
4433    Boolean feature macro.
4434
4435RANGE:
4436    Defined or undefined.
4437
4438DEFAULT VALUE:
4439    This is not defined by default.
4440
4441DESCRIPTION:
4442    ``CONFIGURE_APPLICATION_NEEDS_FRAME_BUFFER_DRIVER`` is defined if the
4443    application wishes to include the BSP's Frame Buffer Device Driver.
4444
4445NOTES:
4446    Most BSPs do not include support for a Frame Buffer Device Driver. This is
4447    because many boards do not include the required hardware.
4448
4449    If this is defined and the BSP does not have this device driver, then the
4450    user will get a link time error for an undefined symbol.
4451
4452.. COMMENT: === CONFIGURE_APPLICATION_NEEDS_STUB_DRIVER ===
4453
4454.. _Enable Stub Device Driver:
4455
4456Enable Stub Device Driver
4457-------------------------
4458.. index:: CONFIGURE_APPLICATION_NEEDS_STUB_DRIVER
4459
4460CONSTANT:
4461    ``CONFIGURE_APPLICATION_NEEDS_STUB_DRIVER``
4462
4463DATA TYPE:
4464    Boolean feature macro.
4465
4466RANGE:
4467    Defined or undefined.
4468
4469DEFAULT VALUE:
4470    This is not defined by default.
4471
4472DESCRIPTION:
4473    ``CONFIGURE_APPLICATION_NEEDS_STUB_DRIVER`` is defined if the application
4474    wishes to include the Stub Device Driver.
4475
4476NOTES:
4477    This device driver simply provides entry points that return successful and
4478    is primarily a test fixture. It is supported by all BSPs.
4479
4480.. COMMENT: === CONFIGURE_APPLICATION_PREREQUISITE_DRIVERS ===
4481
4482.. _Specify Application Prerequisite Device Drivers:
4483
4484Specify Application Prerequisite Device Drivers
4485-----------------------------------------------
4486.. index:: CONFIGURE_APPLICATION_PREREQUISITE_DRIVERS
4487
4488CONSTANT:
4489    ``CONFIGURE_APPLICATION_PREREQUISITE_DRIVERS``
4490
4491DATA TYPE:
4492    device driver entry structures
4493
4494RANGE:
4495    Undefined or set of device driver entry structures
4496
4497DEFAULT VALUE:
4498    This is not defined by default.
4499
4500DESCRIPTION:
4501    ``CONFIGURE_APPLICATION_PREREQUISITE_DRIVERS`` is defined if the
4502    application has device drivers it needs to include in the Device Driver
4503    Table.  This should be defined to the set of device driver entries that
4504    will be placed in the table at the *FRONT* of the Device Driver Table and
4505    initialized before any other drivers *EXCEPT* any BSP prerequisite drivers.
4506
4507NOTES:
4508    In some cases, it is used by System On Chip BSPs to support peripheral
4509    buses beyond those normally found on the System On Chip. For example, this
4510    is used by one RTEMS system which has implemented a SPARC/ERC32 based board
4511    with VMEBus. The VMEBus Controller initialization is performed by a device
4512    driver configured via this configuration parameter.
4513
4514.. COMMENT: XXX Add example
4515
4516.. COMMENT: === CONFIGURE_APPLICATION_EXTRA_DRIVERS ===
4517
4518.. _Specify Extra Application Device Drivers:
4519
4520Specify Extra Application Device Drivers
4521----------------------------------------
4522.. index:: CONFIGURE_APPLICATION_EXTRA_DRIVERS
4523
4524CONSTANT:
4525    ``CONFIGURE_APPLICATION_EXTRA_DRIVERS``
4526
4527DATA TYPE:
4528    device driver entry structures
4529
4530RANGE:
4531    Undefined or set of device driver entry structures
4532
4533DEFAULT VALUE:
4534    This is not defined by default.
4535
4536DESCRIPTION:
4537    ``CONFIGURE_APPLICATION_EXTRA_DRIVERS`` is defined if the application has
4538    device drivers it needs to include in the Device Driver Table.  This should
4539    be defined to the set of device driver entries that will be placed in the
4540    table at the *END* of the Device Driver Table.
4541
4542NOTES:
4543    None.
4544
4545.. COMMENT: === CONFIGURE_APPLICATION_NEEDS_NULL_DRIVER ===
4546
4547.. _Enable /dev/null Device Driver:
4548
4549Enable /dev/null Device Driver
4550------------------------------
4551.. index:: CONFIGURE_APPLICATION_NEEDS_NULL_DRIVER
4552.. index:: /dev/null
4553
4554CONSTANT:
4555    ``CONFIGURE_APPLICATION_NEEDS_NULL_DRIVER``
4556
4557DATA TYPE:
4558    Boolean feature macro.
4559
4560RANGE:
4561    Defined or undefined.
4562
4563DEFAULT VALUE:
4564    This is not defined by default.
4565
4566DESCRIPTION:
4567    This configuration variable is specified to enable ``/dev/null`` device driver.
4568
4569NOTES:
4570    This device driver is supported by all BSPs.
4571
4572.. COMMENT: === CONFIGURE_APPLICATION_NEEDS_ZERO_DRIVER ===
4573
4574.. _Enable /dev/zero Device Driver:
4575
4576Enable /dev/zero Device Driver
4577------------------------------
4578.. index:: CONFIGURE_APPLICATION_NEEDS_ZERO_DRIVER
4579.. index:: /dev/zero
4580
4581CONSTANT:
4582    ``CONFIGURE_APPLICATION_NEEDS_ZERO_DRIVER``
4583
4584DATA TYPE:
4585    Boolean feature macro.
4586
4587RANGE:
4588    Defined or undefined.
4589
4590DEFAULT VALUE:
4591    This is not defined by default.
4592
4593DESCRIPTION:
4594    This configuration variable is specified to enable ``/dev/zero`` device driver.
4595
4596NOTES:
4597    This device driver is supported by all BSPs.
4598
4599.. COMMENT: === CONFIGURE_HAS_OWN_DEVICE_DRIVER_TABLE ===
4600
4601.. _Specifying Application Defined Device Driver Table:
4602
4603Specifying Application Defined Device Driver Table
4604--------------------------------------------------
4605.. index:: CONFIGURE_HAS_OWN_DEVICE_DRIVER_TABLE
4606
4607CONSTANT:
4608    ``CONFIGURE_HAS_OWN_DEVICE_DRIVER_TABLE``
4609
4610DATA TYPE:
4611    Boolean feature macro.
4612
4613RANGE:
4614    Defined or undefined.
4615
4616DEFAULT VALUE:
4617    This is not defined by default, indicating the ``<rtems/confdefs.h>`` is
4618    providing the device driver table.
4619
4620DESCRIPTION:
4621    ``CONFIGURE_HAS_OWN_DEVICE_DRIVER_TABLE`` is defined if the application
4622    wishes to provide their own Device Driver Table.
4623
4624    The table must be an array of ``rtems_driver_address_table`` entries
4625    named`` _IO_Driver_address_table``.  The application must also provide a
4626    const variable ``_IO_Number_of_drivers`` of type ``size_t`` indicating the
4627    number of entries in the ``_IO_Driver_address_table``.
4628
4629NOTES:
4630    It is expected that there the application would only rarely need to do this.
4631
4632.. COMMENT: === Multiprocessing Configuration ===
4633
4634Multiprocessing Configuration
4635=============================
4636
4637This section defines the multiprocessing related system configuration
4638parameters supported by ``<rtems/confdefs.h>``.  They are only used if the
4639Multiprocessing Support (distinct from the SMP support) is enabled at configure
4640time using the ``--enable-multiprocessing`` option.
4641
4642Additionally, this class of Configuration Constants are only applicable if
4643``CONFIGURE_MP_APPLICATION`` is defined.
4644
4645.. COMMENT: === CONFIGURE_MP_APPLICATION ===
4646
4647.. _Specify Application Will Use Multiprocessing:
4648
4649Specify Application Will Use Multiprocessing
4650--------------------------------------------
4651.. index:: CONFIGURE_MP_APPLICATION
4652
4653CONSTANT:
4654    ``CONFIGURE_MP_APPLICATION``
4655
4656DATA TYPE:
4657    Boolean feature macro.
4658
4659RANGE:
4660    Defined or undefined.
4661
4662DEFAULT VALUE:
4663    This is not defined by default.
4664
4665DESCRIPTION:
4666    This configuration parameter must be defined to indicate that the
4667    application intends to be part of a multiprocessing
4668    configuration. Additional configuration parameters are assumed to be
4669    provided.
4670
4671NOTES:
4672    This has no impact unless RTEMS was configured and built using the
4673    ``--enable-multiprocessing`` option.
4674
4675.. COMMENT: === CONFIGURE_MP_NODE_NUMBER ===
4676
4677.. _Configure Node Number in Multiprocessor Configuration:
4678
4679Configure Node Number in Multiprocessor Configuration
4680-----------------------------------------------------
4681.. index:: CONFIGURE_MP_NODE_NUMBER
4682
4683CONSTANT:
4684    ``CONFIGURE_MP_NODE_NUMBER``
4685
4686DATA TYPE:
4687    Unsigned integer (``uint32_t``).
4688
4689RANGE:
4690    Positive.
4691
4692DEFAULT VALUE:
4693    The default value is ``NODE_NUMBER``, which is assumed to be set by the
4694    compilation environment.
4695
4696DESCRIPTION:
4697    ``CONFIGURE_MP_NODE_NUMBER`` is the node number of this node in a
4698    multiprocessor system.
4699
4700NOTES:
4701    In the RTEMS Multiprocessing Test Suite, the node number is derived from
4702    the Makefile variable ``NODE_NUMBER``. The same code is compiled with the
4703    ``NODE_NUMBER`` set to different values. The test programs behave
4704    differently based upon their node number.
4705
4706.. COMMENT: === CONFIGURE_MP_MAXIMUM_NODES ===
4707
4708.. _Configure Maximum Node in Multiprocessor Configuration:
4709
4710Configure Maximum Node in Multiprocessor Configuration
4711------------------------------------------------------
4712.. index:: CONFIGURE_MP_MAXIMUM_NODES
4713
4714CONSTANT:
4715    ``CONFIGURE_MP_MAXIMUM_NODES``
4716
4717DATA TYPE:
4718    Unsigned integer (``uint32_t``).
4719
4720RANGE:
4721    Positive.
4722
4723DEFAULT VALUE:
4724    The default value is 2.
4725
4726DESCRIPTION:
4727    ``CONFIGURE_MP_MAXIMUM_NODES`` is the maximum number of nodes in a
4728    multiprocessor system.
4729
4730NOTES:
4731    None.
4732
4733.. COMMENT: === CONFIGURE_MP_MAXIMUM_GLOBAL_OBJECTS ===
4734
4735.. _Configure Maximum Global Objects in Multiprocessor Configuration:
4736
4737Configure Maximum Global Objects in Multiprocessor Configuration
4738----------------------------------------------------------------
4739.. index:: CONFIGURE_MP_MAXIMUM_GLOBAL_OBJECTS
4740
4741CONSTANT:
4742    ``CONFIGURE_MP_MAXIMUM_GLOBAL_OBJECTS``
4743
4744DATA TYPE:
4745    Unsigned integer (``uint32_t``).
4746
4747RANGE:
4748    Positive.
4749
4750DEFAULT VALUE:
4751    The default value is 32.
4752
4753DESCRIPTION:
4754    ``CONFIGURE_MP_MAXIMUM_GLOBAL_OBJECTS`` is the maximum number of
4755    concurrently active global objects in a multiprocessor system.
4756
4757NOTES:
4758    This value corresponds to the total number of objects which can be created
4759    with the ``RTEMS_GLOBAL`` attribute.
4760
4761.. COMMENT: === CONFIGURE_MP_MAXIMUM_PROXIES ===
4762
4763.. _Configure Maximum Proxies in Multiprocessor Configuration:
4764
4765Configure Maximum Proxies in Multiprocessor Configuration
4766---------------------------------------------------------
4767.. index:: CONFIGURE_MP_MAXIMUM_PROXIES
4768
4769CONSTANT:
4770    ``CONFIGURE_MP_MAXIMUM_PROXIES``
4771
4772DATA TYPE:
4773    Unsigned integer (``uint32_t``).
4774
4775RANGE:
4776    Undefined or positive.
4777
4778DEFAULT VALUE:
4779    The default value is 32.
4780
4781DESCRIPTION:
4782    ``CONFIGURE_MP_MAXIMUM_PROXIES`` is the maximum number of concurrently
4783    active thread/task proxies on this node in a multiprocessor system.
4784
4785NOTES:
4786    Since a proxy is used to represent a remote task/thread which is blocking
4787    on this node. This configuration parameter reflects the maximum number of
4788    remote tasks/threads which can be blocked on objects on this node.
4789
4790.. COMMENT: XXX - add xref to proxy discussion in MP chapter
4791
4792.. COMMENT: === CONFIGURE_MP_MPCI_TABLE_POINTER ===
4793
4794.. _Configure MPCI in Multiprocessor Configuration:
4795
4796Configure MPCI in Multiprocessor Configuration
4797----------------------------------------------
4798.. index:: CONFIGURE_MP_MPCI_TABLE_POINTER
4799
4800CONSTANT:
4801    ``CONFIGURE_MP_MPCI_TABLE_POINTER``
4802
4803DATA TYPE:
4804    pointer to ``rtems_mpci_table``
4805
4806RANGE:
4807    undefined or valid pointer
4808
4809DEFAULT VALUE:
4810    This is not defined by default.
4811
4812DESCRIPTION:
4813    ``CONFIGURE_MP_MPCI_TABLE_POINTER`` is the pointer to the MPCI
4814    Configuration Table.  The default value of this field is``&MPCI_table``.
4815
4816NOTES:
4817    RTEMS provides a Shared Memory MPCI Device Driver which can be used on any
4818    Multiprocessor System assuming the BSP provides the proper set of
4819    supporting methods.
4820
4821.. COMMENT: === CONFIGURE_HAS_OWN_MULTIPROCESSING_TABLE ===
4822
4823.. _Do Not Generate Multiprocessor Configuration Table:
4824
4825Do Not Generate Multiprocessor Configuration Table
4826--------------------------------------------------
4827.. index:: CONFIGURE_HAS_OWN_MULTIPROCESSING_TABLE
4828
4829CONSTANT:
4830    ``CONFIGURE_HAS_OWN_MULTIPROCESSING_TABLE``
4831
4832DATA TYPE:
4833    Boolean feature macro.
4834
4835RANGE:
4836    Defined or undefined.
4837
4838DEFAULT VALUE:
4839    This is not defined by default.
4840
4841DESCRIPTION:
4842    ``CONFIGURE_HAS_OWN_MULTIPROCESSING_TABLE`` is defined if the application
4843    wishes to provide their own Multiprocessing Configuration Table.  The
4844    generated table is named ``Multiprocessing_configuration``.
4845
4846NOTES:
4847    This is a configuration parameter which is very unlikely to be used by an
4848    application. If you find yourself wanting to use it in an application,
4849    please reconsider and discuss this on the RTEMS Users mailing list.
4850
4851.. COMMENT: === Ada Tasks ===
4852
4853Ada Tasks
4854=========
4855
4856This section defines the system configuration parameters supported by
4857``<rtems/confdefs.h>`` related to configuring RTEMS to support a task using Ada
4858tasking with GNAT/RTEMS.
4859
4860These configuration parameters are only available when RTEMS is built with the
4861``--enable-ada`` configure option and the application specifies
4862``CONFIGURE_GNAT_RTEMS``.
4863
4864Additionally RTEMS includes an Ada language binding to the Classic API which
4865has a test suite. This test suite is enabled only when``--enable-tests`` and
4866``--enable-expada`` are specified on the configure command.
4867
4868.. COMMENT: === CONFIGURE_GNAT_RTEMS ===
4869
4870.. _Specify Application Includes Ada Code:
4871
4872Specify Application Includes Ada Code
4873-------------------------------------
4874.. index:: CONFIGURE_GNAT_RTEMS
4875
4876CONSTANT:
4877    ``CONFIGURE_GNAT_RTEMS``
4878
4879DATA TYPE:
4880    Boolean feature macro.
4881
4882RANGE:
4883    Defined or undefined.
4884
4885DEFAULT VALUE:
4886    This is not defined by default.
4887
4888DESCRIPTION:
4889    ``CONFIGURE_GNAT_RTEMS`` is defined to inform RTEMS that the GNAT Ada
4890    run-time is to be used by the application.
4891
4892NOTES:
4893    This configuration parameter is critical as it makes``<rtems/confdefs.h>``
4894    configure the resources (POSIX API Threads, Mutexes, Condition Variables,
4895    and Keys) used implicitly by the GNAT run-time.
4896
4897.. COMMENT: === CONFIGURE_MAXIMUM_ADA_TASKS ===
4898
4899.. _Specify the Maximum Number of Ada Tasks.:
4900
4901Specify the Maximum Number of Ada Tasks.
4902----------------------------------------
4903.. index:: CONFIGURE_MAXIMUM_ADA_TASKS
4904
4905CONSTANT:
4906    ``CONFIGURE_MAXIMUM_ADA_TASKS``
4907
4908DATA TYPE:
4909    Unsigned integer (``uint32_t``).
4910
4911RANGE:
4912    Undefined or positive.
4913
4914DEFAULT VALUE:
4915    If ``CONFIGURE_GNAT_RTEMS`` is defined, then the default value is 20,
4916    otherwise the default value is 0.
4917
4918DESCRIPTION:
4919    ``CONFIGURE_MAXIMUM_ADA_TASKS`` is the number of Ada tasks that can be
4920    concurrently active in the system.
4921
4922NOTES:
4923    None.
4924
4925.. COMMENT: === CONFIGURE_MAXIMUM_FAKE_ADA_TASKS ===
4926
4927.. _Specify the Maximum Fake Ada Tasks:
4928
4929Specify the Maximum Fake Ada Tasks
4930----------------------------------
4931.. index:: CONFIGURE_MAXIMUM_FAKE_ADA_TASKS
4932
4933CONSTANT:
4934    .. index:: ``CONFIGURE_MAXIMUM_FAKE_ADA_TASKS``
4935
4936DATA TYPE:
4937    Unsigned integer (``uint32_t``).
4938
4939RANGE:
4940    Zero or positive.
4941
4942DEFAULT VALUE:
4943    The default value is 0.
4944
4945DESCRIPTION:
4946    ``CONFIGURE_MAXIMUM_FAKE_ADA_TASKS`` is the number of *fake* Ada tasks that
4947    can be concurrently active in the system.  A *fake* Ada task is a non-Ada
4948    task that makes calls back into Ada code and thus implicitly uses the Ada
4949    run-time.
4950
4951NOTES:
4952    None.
4953
4954.. COMMENT: === PCI Library ===
4955
4956PCI Library
4957===========
4958
4959This section defines the system configuration parameters supported by
4960``rtems/confdefs.h`` related to configuring the PCI Library for RTEMS.
4961
4962The PCI Library startup behaviour can be configured in four different ways
4963depending on how ``CONFIGURE_PCI_CONFIG_LIB`` is defined:
4964
4965.. index:: PCI_LIB_AUTO
4966
4967``PCI_LIB_AUTO``
4968  Used to enable the PCI auto configuration software. PCI will be automatically
4969  probed, PCI buses enumerated, all devices and bridges will be initialized
4970  using Plug & Play software routines. The PCI device tree will be populated
4971  based on the PCI devices found in the system, PCI devices will be configured
4972  by allocating address region resources automatically in PCI space according
4973  to the BSP or host bridge driver set up.
4974
4975.. index:: PCI_LIB_READ
4976
4977``PCI_LIB_READ``
4978  Used to enable the PCI read configuration software. The current PCI
4979  configuration is read to create the RAM representation (the PCI device tree)
4980  of the PCI devices present. PCI devices are assumed to already have been
4981  initialized and PCI buses enumerated, it is therefore required that a BIOS or
4982  a boot loader has set up configuration space prior to booting into RTEMS.
4983
4984.. index:: PCI_LIB_STATIC
4985
4986``PCI_LIB_STATIC``
4987  Used to enable the PCI static configuration software. The user provides a PCI
4988  tree with information how all PCI devices are to be configured at compile
4989  time by linking in a custom ``struct pci_bus pci_hb`` tree. The static PCI
4990  library will not probe PCI for devices, instead it will assume that all
4991  devices defined by the user are present, it will enumerate the PCI buses and
4992  configure all PCI devices in static configuration accordingly. Since probe
4993  and allocation software is not needed the startup is faster, has smaller
4994  footprint and does not require dynamic memory allocation.
4995
4996.. index:: PCI_LIB_PERIPHERAL
4997
4998``PCI_LIB_PERIPHERAL``
4999  Used to enable the PCI peripheral configuration. It is similar to
5000  ``PCI_LIB_STATIC``, but it will never write the configuration to the PCI
5001  devices since PCI peripherals are not allowed to access PCI configuration
5002  space.
5003
5004Note that selecting ``PCI_LIB_STATIC`` or ``PCI_LIB_PERIPHERAL`` but not
5005defining ``pci_hb`` will reuslt in link errors. Note also that in these modes
5006Plug & Play is not performed.
5007
5008.. COMMENT: === Go Tasks ===
5009
5010Go Tasks
5011========
5012
5013.. COMMENT: === CONFIGURE_ENABLE_GO ===
5014
5015.. _Specify Application Includes Go Code:
5016
5017Specify Application Includes Go Code
5018------------------------------------
5019.. index:: CONFIGURE_ENABLE_GO
5020
5021CONSTANT:
5022    ``CONFIGURE_ENABLE_GO``
5023
5024DATA TYPE:
5025    Boolean feature macro.
5026
5027RANGE:
5028    Defined or undefined.
5029
5030DEFAULT VALUE:
5031    This is not defined by default.
5032
5033DESCRIPTION:
5034    ``CONFIGURE_ENABLE_GO`` is defined to inform RTEMS that the Go run-time is
5035    to be used by the application.
5036
5037NOTES:
5038    The Go language support is experimental
5039
5040.. COMMENT: === CONFIGURE_MAXIMUM_GOROUTINES ===
5041
5042.. _Specify the maximum number of Go routines:
5043
5044Specify the maximum number of Go routines
5045-----------------------------------------
5046.. index:: CONFIGURE_MAXIMUM_GOROUTINES
5047
5048CONSTANT:
5049    ``CONFIGURE_MAXIMUM_GOROUTINES``
5050
5051DATA TYPE:
5052    Unsigned integer (``uint32_t``).
5053
5054RANGE:
5055    Zero or positive.
5056
5057DEFAULT VALUE:
5058    The default value is 400
5059
5060DESCRIPTION:
5061    ``CONFIGURE_MAXIMUM_GOROUTINES`` is defined to specify the maximum number
5062    of Go routines.
5063
5064NOTES:
5065    The Go language support is experimental
5066
5067.. COMMENT: === CONFIGURE_MAXIMUM_GO_CHANNELS ===
5068
5069.. _Specify the maximum number of Go Channels:
5070
5071Specify the maximum number of Go Channels
5072-----------------------------------------
5073.. index:: CONFIGURE_MAXIMUM_GO_CHANNELS
5074
5075CONSTANT:
5076    ``CONFIGURE_MAXIMUM_GO_CHANNELS``
5077
5078DATA TYPE:
5079    Unsigned integer (``uint32_t``).
5080
5081RANGE:
5082    Zero or positive.
5083
5084DEFAULT VALUE:
5085    The default value is 500
5086
5087DESCRIPTION:
5088    ``CONFIGURE_MAXIMUM_GO_CHANNELS`` is defined to specify the maximum number
5089    of Go channels.
5090
5091NOTES:
5092    The Go language support is experimental
5093
5094.. COMMENT: === Configuration Data Structures ===
5095
5096Configuration Data Structures
5097=============================
5098
5099It is recommended that applications be configured using ``<rtems/confdefs.h>``
5100as it is simpler and insulates applications from changes in the underlying data
5101structures.  However, it is sometimes important to understand the data
5102structures that are automatically filled in by the configuration parameters.
5103This section describes the primary configuration data structures.
5104
5105If the user wishes to see the details of a particular data structure, they are
5106are advised to look at the source code. After all, that is one of the
5107advantages of RTEMS.
Note: See TracBrowser for help on using the repository browser.