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

5
Last change on this file since a0d2eee was a0d2eee, checked in by Sebastian Huber <sebastian.huber@…>, on 02/01/17 at 12:38:41

Use "in X config..." instead of "on X config..."

  • Property mode set to 100644
File size: 141.9 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_MICROSECONDS_PER_TICK ===
1651
1652.. _CONFIGURE_MICROSECONDS_PER_TICK:
1653
1654Length of Each Clock Tick
1655-------------------------
1656.. index:: CONFIGURE_MICROSECONDS_PER_TICK
1657.. index:: tick quantum
1658
1659CONSTANT:
1660    ``CONFIGURE_MICROSECONDS_PER_TICK``
1661
1662DATA TYPE:
1663    Unsigned integer (``uint32_t``).
1664
1665RANGE:
1666    Positive.
1667
1668DEFAULT VALUE:
1669    This is not defined by default. When not defined, the clock tick quantum is
1670    configured to be 10,000 microseconds which is ten (10) milliseconds.
1671
1672DESCRIPTION:
1673    This constant is  used to specify the length of time between clock ticks.
1674
1675    When the clock tick quantum value is too low, the system will spend so much
1676    time processing clock ticks that it does not have processing time available
1677    to perform application work. In this case, the system will become
1678    unresponsive.
1679
1680    The lowest practical time quantum varies widely based upon the speed of the
1681    target hardware and the architectural overhead associated with
1682    interrupts. In general terms, you do not want to configure it lower than is
1683    needed for the application.
1684
1685    The clock tick quantum should be selected such that it all blocking and
1686    delay times in the application are evenly divisible by it. Otherwise,
1687    rounding errors will be introduced which may negatively impact the
1688    application.
1689
1690NOTES:
1691    This configuration parameter has no impact if the Clock Tick Device driver
1692    is not configured.
1693
1694    There may be BSP specific limits on the resolution or maximum value of a
1695    clock tick quantum.
1696
1697.. COMMENT: === CONFIGURE_TICKS_PER_TIMESLICE ===
1698
1699.. _Specifying Timeslicing Quantum:
1700
1701Specifying Timeslicing Quantum
1702------------------------------
1703.. index:: CONFIGURE_TICKS_PER_TIMESLICE
1704.. index:: ticks per timeslice
1705
1706CONSTANT:
1707    ``CONFIGURE_TICKS_PER_TIMESLICE``
1708
1709DATA TYPE:
1710    Unsigned integer (``uint32_t``).
1711
1712RANGE:
1713    Positive.
1714
1715DEFAULT VALUE:
1716    The default value is 50.
1717
1718DESCRIPTION:
1719    This configuration parameter specifies the length of the timeslice quantum
1720    in ticks for each task.
1721
1722NOTES:
1723    This configuration parameter has no impact if the Clock Tick Device driver
1724    is not configured.
1725
1726.. COMMENT: === CONFIGURE_MAXIMUM_PRIORITY ===
1727
1728.. _Specifying the Number of Thread Priority Levels:
1729
1730Specifying the Number of Thread Priority Levels
1731-----------------------------------------------
1732.. index:: CONFIGURE_MAXIMUM_PRIORITY
1733.. index:: maximum priority
1734.. index:: number of priority levels
1735
1736CONSTANT:
1737    ``CONFIGURE_MAXIMUM_PRIORITY``
1738
1739DATA TYPE:
1740    Unsigned integer (``uint8_t``).
1741
1742RANGE:
1743    Valid values for this configuration parameter must be one (1) less than
1744    than a power of two (2) between 4 and 256 inclusively.  In other words,
1745    valid values are 3, 7, 31, 63, 127, and 255.
1746
1747DEFAULT VALUE:
1748    The default value is 255, because RTEMS must support 256 priority levels to
1749    be compliant with various standards. These priorities range from zero (0)
1750    to 255.
1751
1752DESCRIPTION:
1753   This configuration parameter specified the maximum numeric priority of any
1754   task in the system and one less that the number of priority levels in the
1755   system.
1756
1757   Reducing the number of priorities in the system reduces the amount of memory
1758   allocated from the RTEMS Workspace.
1759
1760NOTES:
1761   The numerically greatest priority is the logically lowest priority in the
1762   system and will thus be used by the IDLE task.
1763
1764   Priority zero (0) is reserved for internal use by RTEMS and is not available
1765   to applications.
1766
1767   With some schedulers, reducing the number of priorities can reduce the
1768   amount of memory used by the scheduler. For example, the Deterministic
1769   Priority Scheduler (DPS) used by default uses three pointers of storage per
1770   priority level. Reducing the number of priorities from 256 levels to
1771   sixteen (16) can reduce memory usage by about three (3) kilobytes.
1772
1773.. COMMENT: === CONFIGURE_MAXIMUM_THREAD_NAME_SIZE ===
1774
1775.. _CONFIGURE_MAXIMUM_THREAD_NAME_SIZE:
1776
1777Specifying the Maximum Thread Name Size
1778---------------------------------------
1779.. index:: CONFIGURE_MAXIMUM_THREAD_NAME_SIZE
1780.. index:: maximum thread name size
1781
1782CONSTANT:
1783    ``CONFIGURE_MAXIMUM_THREAD_NAME_SIZE``
1784
1785DATA TYPE:
1786    Unsigned integer (``size_t``).
1787
1788RANGE:
1789    No restrictions.
1790
1791DEFAULT VALUE:
1792    The default value is 16.  This value was chosen for Linux compatibility,
1793    see
1794    `PTHREAD_SETNAME_NP(3) <http://man7.org/linux/man-pages/man3/pthread_setname_np.3.html>`_.
1795
1796DESCRIPTION:
1797   This configuration parameter specifies the maximum thread name size
1798   including the terminating `NUL` character.
1799
1800NOTE:
1801   The size of the thread control block is increased by the maximum thread name
1802   size.  This configuration option is available since RTEMS 4.12.
1803
1804.. COMMENT: === CONFIGURE_MINIMUM_TASK_STACK_SIZE ===
1805
1806.. _Specifying the Minimum Task Size:
1807
1808Specifying the Minimum Task Size
1809--------------------------------
1810.. index:: CONFIGURE_MINIMUM_TASK_STACK_SIZE
1811.. index:: minimum task stack size
1812
1813CONSTANT:
1814    ``CONFIGURE_MINIMUM_TASK_STACK_SIZE``
1815
1816DATA TYPE:
1817    Unsigned integer (``uint32_t``).
1818
1819RANGE:
1820    Positive.
1821
1822DEFAULT VALUE:
1823    This is not defined by default, which sets the executive to the recommended
1824    minimum stack size for this processor.
1825
1826DESCRIPTION:
1827    The configuration parameter is set to the number of bytes the application
1828    wants the minimum stack size to be for every task or thread in the system.
1829
1830    Adjusting this parameter should be done with caution. Examining the actual
1831    usage using the Stack Checker Usage Reporting facility is recommended.
1832
1833NOTES:
1834    This parameter can be used to lower the minimum from that recommended. This
1835    can be used in low memory systems to reduce memory consumption for
1836    stacks. However, this must be done with caution as it could increase the
1837    possibility of a blown task stack.
1838
1839    This parameter can be used to increase the minimum from that
1840    recommended. This can be used in higher memory systems to reduce the risk
1841    of stack overflow without performing analysis on actual consumption.
1842
1843.. COMMENT: === CONFIGURE_INTERRUPT_STACK_SIZE ===
1844
1845.. _Configuring the Size of the Interrupt Stack:
1846
1847Configuring the Size of the Interrupt Stack
1848-------------------------------------------
1849.. index:: CONFIGURE_INTERRUPT_STACK_SIZE
1850.. index:: interrupt stack size
1851
1852CONSTANT:
1853    ``CONFIGURE_INTERRUPT_STACK_SIZE``
1854
1855DATA TYPE:
1856    Unsigned integer (``uint32_t``).
1857
1858RANGE:
1859    Positive.
1860
1861DEFAULT VALUE:
1862    The default value is CONFIGURE_MINIMUM_TASK_STACK_SIZE, which is the
1863    minimum interrupt stack size.
1864
1865DESCRIPTION:
1866    ``CONFIGURE_INTERRUPT_STACK_SIZE`` is set to the size of the interrupt
1867    stack.  The interrupt stack size is often set by the BSP but since this
1868    memory may be allocated from the RTEMS Workspace, it must be accounted for.
1869
1870NOTES:
1871    In some BSPs, changing this constant does NOT change the size of the
1872    interrupt stack, only the amount of memory reserved for it.
1873
1874    Patches which result in this constant only being used in memory
1875    calculations when the interrupt stack is intended to be allocated from the
1876    RTEMS Workspace would be welcomed by the RTEMS Project.
1877
1878.. COMMENT: === CONFIGURE_EXTRA_TASK_STACKS ===
1879
1880.. _Reserve Task/Thread Stack Memory Above Minimum:
1881
1882Reserve Task/Thread Stack Memory Above Minimum
1883----------------------------------------------
1884.. index:: CONFIGURE_EXTRA_TASK_STACKS
1885.. index:: memory for task tasks
1886
1887CONSTANT:
1888    ``CONFIGURE_EXTRA_TASK_STACKS``
1889
1890DATA TYPE:
1891    Unsigned integer (``size_t``).
1892
1893RANGE:
1894    Undefined or positive.
1895
1896DEFAULT VALUE:
1897    The default value is 0.
1898
1899DESCRIPTION:
1900    This configuration parameter is set to the number of bytes the applications
1901    wishes to add to the task stack requirements calculated by
1902    ``<rtems/confdefs.h>``.
1903
1904NOTES:
1905    This parameter is very important.  If the application creates tasks with
1906    stacks larger then the minimum, then that memory is NOT accounted for by
1907    ``<rtems/confdefs.h>``.
1908
1909.. COMMENT: === CONFIGURE_ZERO_WORKSPACE_AUTOMATICALLY ===
1910
1911.. _Automatically Zeroing the RTEMS Workspace and C Program Heap:
1912
1913Automatically Zeroing the RTEMS Workspace and C Program Heap
1914------------------------------------------------------------
1915.. index:: CONFIGURE_ZERO_WORKSPACE_AUTOMATICALLY
1916.. index:: clear C Program Heap
1917.. index:: clear RTEMS Workspace
1918.. index:: zero C Program Heap
1919.. index:: zero RTEMS Workspace
1920
1921CONSTANT:
1922    ``CONFIGURE_ZERO_WORKSPACE_AUTOMATICALLY``
1923
1924DATA TYPE:
1925    Boolean feature macro.
1926
1927RANGE:
1928    Defined or undefined.
1929
1930DEFAULT VALUE:
1931    This is not defined by default, unless overridden by the BSP.  The default
1932    is *NOT* to zero out the RTEMS Workspace or C Program Heap.
1933
1934DESCRIPTION:
1935    This macro indicates whether RTEMS should zero the RTEMS Workspace and C
1936    Program Heap as part of its initialization.  If defined, the memory regions
1937    are zeroed.  Otherwise, they are not.
1938
1939NOTES:
1940    Zeroing memory can add significantly to system boot time. It is not
1941    necessary for RTEMS but is often assumed by support libraries.
1942
1943.. COMMENT: === CONFIGURE_STACK_CHECKER_ENABLED ===
1944
1945.. _Enable The Task Stack Usage Checker:
1946
1947Enable The Task Stack Usage Checker
1948-----------------------------------
1949.. index:: CONFIGURE_STACK_CHECKER_ENABLED
1950
1951CONSTANT:
1952    ``CONFIGURE_STACK_CHECKER_ENABLED``
1953
1954DATA TYPE:
1955    Boolean feature macro.
1956
1957RANGE:
1958    Defined or undefined.
1959
1960DEFAULT VALUE:
1961    This is not defined by default, and thus stack checking is disabled.
1962
1963DESCRIPTION:
1964    This configuration parameter is defined when the application wishes to
1965    enable run-time stack bounds checking.
1966
1967NOTES:
1968    In 4.9 and older, this configuration parameter was named ``STACK_CHECKER_ON``.
1969
1970    This increases the time required to create tasks as well as adding overhead
1971    to each context switch.
1972
1973.. COMMENT: === CONFIGURE_INITIAL_EXTENSIONS ===
1974
1975.. _CONFIGURE_INITIAL_EXTENSIONS:
1976
1977Specify Application Specific User Extensions
1978--------------------------------------------
1979.. index:: CONFIGURE_INITIAL_EXTENSIONS
1980
1981CONSTANT:
1982    ``CONFIGURE_INITIAL_EXTENSIONS``
1983
1984DATA TYPE:
1985    List of user extension initializers (``rtems_extensions_table``).
1986
1987RANGE:
1988    Undefined or a list of one or more user extensions.
1989
1990DEFAULT VALUE:
1991    This is not defined by default.
1992
1993DESCRIPTION:
1994    If ``CONFIGURE_INITIAL_EXTENSIONS`` is defined by the application, then
1995    this application specific set of initial extensions will be placed in the
1996    initial extension table.
1997
1998NOTES:
1999    None.
2000
2001.. COMMENT: === Custom Stack Allocator ===
2002
2003Configuring Custom Task Stack Allocation
2004========================================
2005
2006RTEMS allows the application or BSP to define its own allocation and
2007deallocation methods for task stacks. This can be used to place task stacks in
2008special areas of memory or to utilize a Memory Management Unit so that stack
2009overflows are detected in hardware.
2010
2011.. COMMENT: === CONFIGURE_TASK_STACK_ALLOCATOR_INIT ===
2012
2013.. _Custom Task Stack Allocator Initialization:
2014
2015Custom Task Stack Allocator Initialization
2016------------------------------------------
2017.. index:: CONFIGURE_TASK_STACK_ALLOCATOR_INIT
2018
2019CONSTANT:
2020    ``CONFIGURE_TASK_STACK_ALLOCATOR_INIT``
2021
2022DATA TYPE:
2023    Function pointer.
2024
2025RANGE:
2026    Undefined, NULL or valid function pointer.
2027
2028DEFAULT VALUE:
2029    The default value is NULL, which indicates that task stacks will be
2030    allocated from the RTEMS Workspace.
2031
2032DESCRIPTION:
2033    ``CONFIGURE_TASK_STACK_ALLOCATOR_INIT`` configures the initialization
2034    method for an application or BSP specific task stack allocation
2035    implementation.
2036
2037NOTES:
2038    A correctly configured system must configure the following to be consistent:
2039
2040- ``CONFIGURE_TASK_STACK_ALLOCATOR_INIT``
2041
2042- ``CONFIGURE_TASK_STACK_ALLOCATOR``
2043
2044- ``CONFIGURE_TASK_STACK_DEALLOCATOR``
2045
2046.. COMMENT: === CONFIGURE_TASK_STACK_ALLOCATOR ===
2047
2048.. _Custom Task Stack Allocator:
2049
2050Custom Task Stack Allocator
2051---------------------------
2052.. index:: CONFIGURE_TASK_STACK_ALLOCATOR
2053
2054.. index:: task stack allocator
2055
2056CONSTANT:
2057    ``CONFIGURE_TASK_STACK_ALLOCATOR``
2058
2059DATA TYPE:
2060    Function pointer.
2061
2062RANGE:
2063    Undefined or valid function pointer.
2064
2065DEFAULT VALUE:
2066    The default value is ``_Workspace_Allocate``, which indicates that task
2067    stacks will be allocated from the RTEMS Workspace.
2068
2069DESCRIPTION:
2070    ``CONFIGURE_TASK_STACK_ALLOCATOR`` may point to a user provided routine to
2071    allocate task stacks.
2072
2073NOTES:
2074    A correctly configured system must configure the following to be consistent:
2075
2076- ``CONFIGURE_TASK_STACK_ALLOCATOR_INIT``
2077
2078- ``CONFIGURE_TASK_STACK_ALLOCATOR``
2079
2080- ``CONFIGURE_TASK_STACK_DEALLOCATOR``
2081
2082.. COMMENT: === CONFIGURE_TASK_STACK_DEALLOCATOR ===
2083
2084.. _Custom Task Stack Deallocator:
2085
2086Custom Task Stack Deallocator
2087-----------------------------
2088.. index:: CONFIGURE_TASK_STACK_DEALLOCATOR
2089.. index:: task stack deallocator
2090
2091CONSTANT:
2092    ``CONFIGURE_TASK_STACK_DEALLOCATOR``
2093
2094DATA TYPE:
2095    Function pointer.
2096
2097RANGE:
2098    Undefined or valid function pointer.
2099
2100DEFAULT VALUE:
2101    The default value is ``_Workspace_Free``, which indicates that task stacks
2102    will be allocated from the RTEMS Workspace.
2103
2104DESCRIPTION:
2105    ``CONFIGURE_TASK_STACK_DEALLOCATOR`` may point to a user provided routine
2106    to free task stacks.
2107
2108NOTES:
2109    A correctly configured system must configure the following to be consistent:
2110
2111- ``CONFIGURE_TASK_STACK_ALLOCATOR_INIT``
2112
2113- ``CONFIGURE_TASK_STACK_ALLOCATOR``
2114
2115- ``CONFIGURE_TASK_STACK_DEALLOCATOR``
2116
2117.. COMMENT: === Classic API Message Buffers ===
2118
2119Configuring Memory for Classic API Message Buffers
2120==================================================
2121
2122This section describes the configuration parameters related to specifying the
2123amount of memory reserved for Classic API Message Buffers.
2124
2125.. COMMENT: === CONFIGURE_MESSAGE_BUFFERS_FOR_QUEUE ===
2126
2127.. _Calculate Memory for a Single Classic Message API Message Queue:
2128
2129Calculate Memory for a Single Classic Message API Message Queue
2130---------------------------------------------------------------
2131.. index:: CONFIGURE_MESSAGE_BUFFERS_FOR_QUEUE
2132.. index:: memory for a single message queue's buffers
2133
2134CONSTANT:
2135    ``CONFIGURE_MESSAGE_BUFFERS_FOR_QUEUE(max_messages, size_per)``
2136
2137DATA TYPE:
2138    Unsigned integer (``size_t``).
2139
2140RANGE:
2141    Positive.
2142
2143DEFAULT VALUE:
2144    The default value is None.
2145
2146DESCRIPTION:
2147    This is a helper macro which is used to assist in computing the total
2148    amount of memory required for message buffers.  Each message queue will
2149    have its own configuration with maximum message size and maximum number of
2150    pending messages.
2151
2152    The interface for this macro is as follows:
2153
2154    .. code-block:: c
2155
2156        CONFIGURE_MESSAGE_BUFFERS_FOR_QUEUE(max_messages, size_per)
2157
2158    Where ``max_messages`` is the maximum number of pending messages and
2159    ``size_per`` is the size in bytes of the user message.
2160
2161NOTES:
2162
2163    This macro is only used in support of ``CONFIGURE_MESSAGE_BUFFER_MEMORY``.
2164
2165.. COMMENT: === CONFIGURE_MESSAGE_BUFFER_MEMORY ===
2166
2167.. _Reserve Memory for All Classic Message API Message Queues:
2168
2169Reserve Memory for All Classic Message API Message Queues
2170---------------------------------------------------------
2171.. index:: CONFIGURE_MESSAGE_BUFFER_MEMORY
2172.. index:: configure message queue buffer memory
2173
2174CONSTANT:
2175    ``CONFIGURE_MESSAGE_BUFFER_MEMORY``
2176
2177DATA TYPE:
2178    integer summation macro
2179
2180RANGE:
2181    undefined (zero) or calculation resulting in a positive integer
2182
2183DEFAULT VALUE:
2184    This is not defined by default, and zero (0) memory is reserved.
2185
2186DESCRIPTION:
2187    This macro is set to the number of bytes the application requires to be
2188    reserved for pending Classic API Message Queue buffers.
2189
2190NOTES:
2191    The following illustrates how the help macro
2192    ``CONFIGURE_MESSAGE_BUFFERS_FOR_QUEUE`` can be used to assist in
2193    calculating the message buffer memory required.  In this example, there are
2194    two message queues used in this application.  The first message queue has
2195    maximum of 24 pending messages with the message structure defined by the
2196    type ``one_message_type``.  The other message queue has maximum of 500
2197    pending messages with the message structure defined by the type
2198    ``other_message_type``.
2199
2200    .. code-block:: c
2201
2202        #define CONFIGURE_MESSAGE_BUFFER_MEMORY \
2203                    (CONFIGURE_MESSAGE_BUFFERS_FOR_QUEUE( \
2204                         24, sizeof(one_message_type) \
2205                     ) + \
2206                     CONFIGURE_MESSAGE_BUFFERS_FOR_QUEUE( \
2207                         500, sizeof(other_message_type) \
2208                     )
2209
2210.. COMMENT: === Seldom Used Configuration Parameters ===
2211
2212Seldom Used Configuration Parameters
2213====================================
2214
2215This section describes configuration parameters supported by
2216``<rtems/confdefs.h>`` which are seldom used by applications. These parameters
2217tend to be oriented to debugging system configurations and providing
2218work-arounds when the memory estimated by ``<rtems/confdefs.h>`` is incorrect.
2219
2220.. COMMENT: === CONFIGURE_MEMORY_OVERHEAD ===
2221
2222.. _Specify Memory Overhead:
2223
2224Specify Memory Overhead
2225-----------------------
2226.. index:: CONFIGURE_MEMORY_OVERHEAD
2227
2228CONSTANT:
2229    ``CONFIGURE_MEMORY_OVERHEAD``
2230
2231DATA TYPE:
2232    Unsigned integer (``size_t``).
2233
2234RANGE:
2235    Zero or positive.
2236
2237DEFAULT VALUE:
2238    The default value is 0.
2239
2240DESCRIPTION:
2241    This parameter is set to the number of kilobytes the application wishes to
2242    add to the requirements calculated by ``<rtems/confdefs.h>``.
2243
2244NOTES:
2245    This configuration parameter should only be used when it is suspected that
2246    a bug in ``<rtems/confdefs.h>`` has resulted in an underestimation.
2247    Typically the memory allocation will be too low when an application does
2248    not account for all message queue buffers or task stacks.
2249
2250.. COMMENT: === CONFIGURE_HAS_OWN_CONFIGURATION_TABLE ===
2251
2252.. _Do Not Generate Configuration Information:
2253
2254Do Not Generate Configuration Information
2255-----------------------------------------
2256.. index:: CONFIGURE_HAS_OWN_CONFIGURATION_TABLE
2257
2258CONSTANT:
2259    ``CONFIGURE_HAS_OWN_CONFIGURATION_TABLE``
2260
2261DATA TYPE:
2262    Boolean feature macro.
2263
2264RANGE:
2265    Defined or undefined.
2266
2267DEFAULT VALUE:
2268    This is not defined by default.
2269
2270DESCRIPTION:
2271    This configuration parameter should only be defined if the application is
2272    providing their own complete set of configuration tables.
2273
2274NOTES:
2275    None.
2276
2277.. COMMENT: === C Library Support Configuration ===
2278
2279C Library Support Configuration
2280===============================
2281
2282This section defines the file system and IO library related configuration
2283parameters supported by ``<rtems/confdefs.h>``.
2284
2285.. COMMENT: === CONFIGURE_LIBIO_MAXIMUM_FILE_DESCRIPTORS ===
2286
2287.. _Specify Maximum Number of File Descriptors:
2288
2289Specify Maximum Number of File Descriptors
2290------------------------------------------
2291.. index:: CONFIGURE_LIBIO_MAXIMUM_FILE_DESCRIPTORS
2292.. index:: maximum file descriptors
2293
2294CONSTANT:
2295    ``CONFIGURE_LIBIO_MAXIMUM_FILE_DESCRIPTORS``
2296
2297DATA TYPE:
2298    Unsigned integer (``uint32_t``).
2299
2300RANGE:
2301    Zero or positive.
2302
2303DEFAULT VALUE:
2304    If ``CONFIGURE_APPLICATION_NEEDS_CONSOLE_DRIVER`` is defined, then the
2305    default value is 3, otherwise the default value is 0.  Three file
2306    descriptors allows RTEMS to support standard input, output, and error I/O
2307    streams on ``/dev/console``.
2308
2309DESCRIPTION:
2310    This configuration parameter is set to the maximum number of file like
2311    objects that can be concurrently open.
2312
2313NOTES:
2314    None.
2315
2316.. COMMENT: === CONFIGURE_TERMIOS_DISABLED ===
2317
2318.. _Disable POSIX Termios Support:
2319
2320Disable POSIX Termios Support
2321-----------------------------
2322.. index:: CONFIGURE_TERMIOS_DISABLED
2323
2324CONSTANT:
2325    ``CONFIGURE_TERMIOS_DISABLED``
2326
2327DATA TYPE:
2328    Boolean feature macro.
2329
2330RANGE:
2331    Defined or undefined.
2332
2333DEFAULT VALUE:
2334    This is not defined by default, and resources are reserved for the termios
2335    functionality.
2336
2337DESCRIPTION:
2338    This configuration parameter is defined if the software implementing POSIX
2339    termios functionality is not going to be used by this application.
2340
2341NOTES:
2342    The termios support library should not be included in an application
2343    executable unless it is directly referenced by the application or a device
2344    driver.
2345
2346.. COMMENT: === CONFIGURE_NUMBER_OF_TERMIOS_PORTS ===
2347
2348.. _Specify Maximum Termios Ports:
2349
2350Specify Maximum Termios Ports
2351-----------------------------
2352.. index:: CONFIGURE_NUMBER_OF_TERMIOS_PORTS
2353
2354CONSTANT:
2355    ``CONFIGURE_NUMBER_OF_TERMIOS_PORTS``
2356
2357DATA TYPE:
2358    Unsigned integer.
2359
2360RANGE:
2361    Zero or positive.
2362
2363DEFAULT VALUE:
2364    The default value is 1, so a console port can be used.
2365
2366DESCRIPTION:
2367    This configuration parameter is set to the number of ports using the
2368    termios functionality.  Each concurrently active termios port requires
2369    resources.
2370
2371NOTES:
2372    If the application will be using serial ports including, but not limited
2373    to, the Console Device
2374    (e.g. ``CONFIGURE_APPLICATION_NEEDS_CONSOLE_DRIVER``), then it is highly
2375    likely that this configuration parameter should NOT be is defined.
2376
2377.. COMMENT: === File System Configuration Parameters ===
2378
2379File System Configuration Parameters
2380====================================
2381
2382This section defines File System related configuration parameters.
2383
2384.. COMMENT: === CONFIGURE_HAS_OWN_MOUNT_TABLE ===
2385
2386.. _Providing Application Specific Mount Table:
2387
2388Providing Application Specific Mount Table
2389------------------------------------------
2390.. index:: CONFIGURE_HAS_OWN_MOUNT_TABLE
2391
2392CONSTANT:
2393    ``CONFIGURE_HAS_OWN_MOUNT_TABLE``
2394
2395DATA TYPE:
2396    Undefined or an array of type ``rtems_filesystem_mount_table_t``.
2397
2398RANGE:
2399    Undefined or an array of type ``rtems_filesystem_mount_table_t``.
2400
2401DEFAULT VALUE:
2402    This is not defined by default.
2403
2404DESCRIPTION:
2405    This configuration parameter is defined when the application provides their
2406    own filesystem mount table.  The mount table is an array of
2407    ``rtems_filesystem_mount_table_t`` entries pointed to by the global
2408    variable ``rtems_filesystem_mount_table``.  The number of entries in this
2409    table is in an integer variable named ``rtems_filesystem_mount_table_t``.
2410
2411.. COMMENT: XXX - is the variable name for the count right?
2412
2413NOTES:
2414    None.
2415
2416.. COMMENT: XXX - Please provide an example
2417
2418.. COMMENT: === CONFIGURE_USE_DEVFS_AS_BASE_FILESYSTEM ===
2419
2420.. _Configure devFS as Root File System:
2421
2422Configure devFS as Root File System
2423-----------------------------------
2424.. index:: CONFIGURE_USE_DEVFS_AS_BASE_FILESYSTEM
2425
2426CONSTANT:
2427    ``CONFIGURE_USE_DEVFS_AS_BASE_FILESYSTEM``
2428
2429DATA TYPE:
2430    Boolean feature macro.
2431
2432RANGE:
2433    Defined or undefined.
2434
2435DEFAULT VALUE:
2436    This is not defined by default. If no other root file system configuration
2437    parameters are specified, the IMFS will be used as the root file system.
2438
2439DESCRIPTION:
2440    This configuration parameter is defined if the application wishes to use
2441    the device-only filesytem as the root file system.
2442
2443NOTES:
2444    The device-only filesystem supports only device nodes and is smaller in
2445    executable code size than the full IMFS and miniIMFS.
2446
2447    The devFS is comparable in functionality to the pseudo-filesystem name
2448    space provided before RTEMS release 4.5.0.
2449
2450.. COMMENT: === CONFIGURE_MAXIMUM_DEVICES ===
2451
2452.. _Specifying Maximum Devices for devFS:
2453
2454Specifying Maximum Devices for devFS
2455------------------------------------
2456.. index:: CONFIGURE_MAXIMUM_DEVICES
2457
2458CONSTANT:
2459    ``CONFIGURE_MAXIMUM_DEVICES``
2460
2461DATA TYPE:
2462    Unsigned integer (``uint32_t``).
2463
2464RANGE:
2465    Positive.
2466
2467DEFAULT VALUE:
2468    If ``BSP_MAXIMUM_DEVICES`` is defined, then the default value is
2469    ``BSP_MAXIMUM_DEVICES``, otherwise the default value is 4.
2470
2471DESCRIPTION:
2472    ``CONFIGURE_MAXIMUM_DEVICES`` is defined to the number of individual
2473    devices that may be registered in the device file system (devFS).
2474
2475NOTES:
2476    This option is specific to the device file system (devFS) and should not be
2477    confused with the ``CONFIGURE_MAXIMUM_DRIVERS`` option.  This parameter
2478    only impacts the devFS and thus is only used by ``<rtems/confdefs.h>`` when
2479    ``CONFIGURE_USE_DEVFS_AS_BASE_FILESYSTEM`` is specified.
2480
2481.. COMMENT: === CONFIGURE_APPLICATION_DISABLE_FILESYSTEM ===
2482
2483.. _Disable File System Support:
2484
2485Disable File System Support
2486---------------------------
2487.. index:: CONFIGURE_APPLICATION_DISABLE_FILESYSTEM
2488
2489CONSTANT:
2490    ``CONFIGURE_APPLICATION_DISABLE_FILESYSTEM``
2491
2492DATA TYPE:
2493    Boolean feature macro.
2494
2495RANGE:
2496    Defined or undefined.
2497
2498DEFAULT VALUE:
2499    This is not defined by default. If no other root file system configuration
2500    parameters are specified, the IMFS will be used as the root file system.
2501
2502DESCRIPTION:
2503    This configuration parameter is defined if the application dose not intend
2504    to use any kind of filesystem support. This include the device
2505    infrastructure necessary to support ``printf()``.
2506
2507NOTES:
2508    None.
2509
2510.. COMMENT: === CONFIGURE_USE_MINIIMFS_AS_BASE_FILESYSTEM ===
2511
2512.. _Use a Root IMFS with a Minimalistic Feature Set:
2513
2514Use a Root IMFS with a Minimalistic Feature Set
2515-----------------------------------------------
2516.. index:: CONFIGURE_USE_MINIIMFS_AS_BASE_FILESYSTEM
2517
2518CONSTANT:
2519    ``CONFIGURE_USE_MINIIMFS_AS_BASE_FILESYSTEM``
2520
2521DATA TYPE:
2522    Boolean feature macro.
2523
2524RANGE:
2525    Defined or undefined.
2526
2527DEFAULT VALUE:
2528    This is not defined by default.
2529
2530DESCRIPTION:
2531    In case this configuration option is defined, then the following
2532    configuration options will be defined as well
2533
2534    - ``CONFIGURE_IMFS_DISABLE_CHMOD``,
2535
2536    - ``CONFIGURE_IMFS_DISABLE_CHOWN``,
2537
2538    - ``CONFIGURE_IMFS_DISABLE_UTIME``,
2539
2540    - ``CONFIGURE_IMFS_DISABLE_LINK``,
2541
2542    - ``CONFIGURE_IMFS_DISABLE_SYMLINK``,
2543
2544    - ``CONFIGURE_IMFS_DISABLE_READLINK``,
2545
2546    - ``CONFIGURE_IMFS_DISABLE_RENAME``, and
2547
2548    - ``CONFIGURE_IMFS_DISABLE_UNMOUNT``.
2549
2550.. COMMENT: === CONFIGURE_IMFS_MEMFILE_BYTES_PER_BLOCK ===
2551
2552.. _Specify Block Size for IMFS:
2553
2554Specify Block Size for IMFS
2555---------------------------
2556.. index:: CONFIGURE_IMFS_MEMFILE_BYTES_PER_BLOCK
2557
2558CONSTANT:
2559    ``CONFIGURE_IMFS_MEMFILE_BYTES_PER_BLOCK``
2560
2561DATA TYPE:
2562    Boolean feature macro.
2563
2564RANGE:
2565    Valid values for this configuration parameter are a power of two (2)
2566    between 16 and 512 inclusive.  In other words, valid values are 16, 32, 64,
2567    128, 256,and 512.
2568
2569DEFAULT VALUE:
2570    The default IMFS block size is 128 bytes.
2571
2572DESCRIPTION:
2573    This configuration parameter specifies the block size for in-memory files
2574    managed by the IMFS. The configured block size has two impacts. The first
2575    is the average amount of unused memory in the last block of each file. For
2576    example, when the block size is 512, on average one-half of the last block
2577    of each file will remain unused and the memory is wasted. In contrast, when
2578    the block size is 16, the average unused memory per file is only 8
2579    bytes. However, it requires more allocations for the same size file and
2580    thus more overhead per block for the dynamic memory management.
2581
2582    Second, the block size has an impact on the maximum size file that can be
2583    stored in the IMFS. With smaller block size, the maximum file size is
2584    correspondingly smaller. The following shows the maximum file size possible
2585    based on the configured block size:
2586
2587    - when the block size is 16 bytes, the maximum file size is 1,328 bytes.
2588
2589    - when the block size is 32 bytes, the maximum file size is 18,656 bytes.
2590
2591    - when the block size is 64 bytes, the maximum file size is 279,488 bytes.
2592
2593    - when the block size is 128 bytes, the maximum file size is 4,329,344 bytes.
2594
2595    - when the block size is 256 bytes, the maximum file size is 68,173,568 bytes.
2596
2597    - when the block size is 512 bytes, the maximum file size is 1,082,195,456
2598      bytes.
2599
2600.. COMMENT: === CONFIGURE_IMFS_DISABLE_CHOWN ===
2601
2602.. _Disable Change Owner Support of Root IMFS:
2603
2604Disable Change Owner Support of Root IMFS
2605-----------------------------------------
2606.. index:: CONFIGURE_IMFS_DISABLE_CHOWN
2607
2608CONSTANT:
2609    ``CONFIGURE_IMFS_DISABLE_CHOWN``
2610
2611DATA TYPE:
2612    Boolean feature macro.
2613
2614RANGE:
2615    Defined or undefined.
2616
2617DEFAULT VALUE:
2618    This is not defined by default.
2619
2620DESCRIPTION:
2621    In case this configuration option is defined, then the support to change
2622    the owner is disabled in the root IMFS.
2623
2624.. COMMENT: === CONFIGURE_IMFS_DISABLE_CHMOD ===
2625
2626.. _Disable Change Mode Support of Root IMFS:
2627
2628Disable Change Mode Support of Root IMFS
2629----------------------------------------
2630.. index:: CONFIGURE_IMFS_DISABLE_CHMOD
2631
2632CONSTANT:
2633    ``CONFIGURE_IMFS_DISABLE_CHMOD``
2634
2635DATA TYPE:
2636    Boolean feature macro.
2637
2638RANGE:
2639    Defined or undefined.
2640
2641DEFAULT VALUE:
2642    This is not defined by default.
2643
2644DESCRIPTION:
2645    In case this configuration option is defined, then the support to change
2646    the mode is disabled in the root IMFS.
2647
2648.. COMMENT: === CONFIGURE_IMFS_DISABLE_UTIME ===
2649
2650.. _Disable Change Times Support of Root IMFS:
2651
2652Disable Change Times Support of Root IMFS
2653-----------------------------------------
2654.. index:: CONFIGURE_IMFS_DISABLE_UTIME
2655
2656CONSTANT:
2657    ``CONFIGURE_IMFS_DISABLE_UTIME``
2658
2659DATA TYPE:
2660    Boolean feature macro.
2661
2662RANGE:
2663    Defined or undefined.
2664
2665DEFAULT VALUE:
2666    This is not defined by default.
2667
2668DESCRIPTION:
2669    In case this configuration option is defined, then the support to change
2670    times is disabled in the root IMFS.
2671
2672.. COMMENT: === CONFIGURE_IMFS_DISABLE_LINK ===
2673
2674.. _Disable Create Hard Link Support of Root IMFS:
2675
2676Disable Create Hard Link Support of Root IMFS
2677---------------------------------------------
2678.. index:: CONFIGURE_IMFS_DISABLE_LINK
2679
2680CONSTANT:
2681    ``CONFIGURE_IMFS_DISABLE_LINK``
2682
2683DATA TYPE:
2684    Boolean feature macro.
2685
2686RANGE:
2687    Defined or undefined.
2688
2689DEFAULT VALUE:
2690    This is not defined by default.
2691
2692DESCRIPTION:
2693    In case this configuration option is defined, then the support to create
2694    hard links is disabled in the root IMFS.
2695
2696.. COMMENT: === CONFIGURE_IMFS_DISABLE_SYMLINK ===
2697
2698.. _Disable Create Symbolic Link Support of Root IMFS:
2699
2700Disable Create Symbolic Link Support of Root IMFS
2701-------------------------------------------------
2702.. index:: CONFIGURE_IMFS_DISABLE_SYMLINK
2703
2704CONSTANT:
2705    ``CONFIGURE_IMFS_DISABLE_SYMLINK``
2706
2707DATA TYPE:
2708    Boolean feature macro.
2709
2710RANGE:
2711    Defined or undefined.
2712
2713DEFAULT VALUE:
2714    This is not defined by default.
2715
2716DESCRIPTION:
2717    In case this configuration option is defined, then the support to create
2718    symbolic links is disabled in the root IMFS.
2719
2720.. COMMENT: === CONFIGURE_IMFS_DISABLE_READLINK ===
2721
2722.. _Disable Read Symbolic Link Support of Root IMFS:
2723
2724Disable Read Symbolic Link Support of Root IMFS
2725-----------------------------------------------
2726.. index:: CONFIGURE_IMFS_DISABLE_READLINK
2727
2728CONSTANT:
2729    ``CONFIGURE_IMFS_DISABLE_READLINK``
2730
2731DATA TYPE:
2732    Boolean feature macro.
2733
2734RANGE:
2735    Defined or undefined.
2736
2737DEFAULT VALUE:
2738    This is not defined by default.
2739
2740DESCRIPTION:
2741    In case this configuration option is defined, then the support to read
2742    symbolic links is disabled in the root IMFS.
2743
2744.. COMMENT: === CONFIGURE_IMFS_DISABLE_RENAME ===
2745
2746.. _Disable Rename Support of Root IMFS:
2747
2748Disable Rename Support of Root IMFS
2749-----------------------------------
2750.. index:: CONFIGURE_IMFS_DISABLE_RENAME
2751
2752CONSTANT:
2753    ``CONFIGURE_IMFS_DISABLE_RENAME``
2754
2755DATA TYPE:
2756    Boolean feature macro.
2757
2758RANGE:
2759    Defined or undefined.
2760
2761DEFAULT VALUE:
2762    This is not defined by default.
2763
2764DESCRIPTION:
2765    In case this configuration option is defined, then the support to rename
2766    nodes is disabled in the root IMFS.
2767
2768.. COMMENT: === CONFIGURE_IMFS_DISABLE_READDIR ===
2769
2770.. _Disable Directory Read Support of Root IMFS:
2771
2772Disable Directory Read Support of Root IMFS
2773-------------------------------------------
2774.. index:: CONFIGURE_IMFS_DISABLE_READDIR
2775
2776CONSTANT:
2777    ``CONFIGURE_IMFS_DISABLE_READDIR``
2778
2779DATA TYPE:
2780    Boolean feature macro.
2781
2782RANGE:
2783    Defined or undefined.
2784
2785DEFAULT VALUE:
2786    This is not defined by default.
2787
2788DESCRIPTION:
2789    In case this configuration option is defined, then the support to read a
2790    directory is disabled in the root IMFS.  It is still possible to open nodes
2791    in a directory.
2792
2793.. COMMENT: === CONFIGURE_IMFS_DISABLE_MOUNT ===
2794
2795.. _Disable Mount Support of Root IMFS:
2796
2797Disable Mount Support of Root IMFS
2798----------------------------------
2799.. index:: CONFIGURE_IMFS_DISABLE_MOUNT
2800
2801CONSTANT:
2802    ``CONFIGURE_IMFS_DISABLE_MOUNT``
2803
2804DATA TYPE:
2805    Boolean feature macro.
2806
2807RANGE:
2808    Defined or undefined.
2809
2810DEFAULT VALUE:
2811    This is not defined by default.
2812
2813DESCRIPTION:
2814    In case this configuration option is defined, then the support to mount
2815    other file systems is disabled in the root IMFS.
2816
2817.. COMMENT: === CONFIGURE_IMFS_DISABLE_UNMOUNT ===
2818
2819.. _Disable Unmount Support of Root IMFS:
2820
2821Disable Unmount Support of Root IMFS
2822------------------------------------
2823.. index:: CONFIGURE_IMFS_DISABLE_UNMOUNT
2824
2825CONSTANT:
2826    ``CONFIGURE_IMFS_DISABLE_UNMOUNT``
2827
2828DATA TYPE:
2829    Boolean feature macro.
2830
2831RANGE:
2832    Defined or undefined.
2833
2834DEFAULT VALUE:
2835    This is not defined by default.
2836
2837DESCRIPTION:
2838    In case this configuration option is defined, then the support to unmount
2839    file systems is disabled in the root IMFS.
2840
2841.. COMMENT: === CONFIGURE_IMFS_DISABLE_MKNOD ===
2842
2843.. _Disable Make Nodes Support of Root IMFS:
2844
2845Disable Make Nodes Support of Root IMFS
2846---------------------------------------
2847.. index:: CONFIGURE_IMFS_DISABLE_MKNOD
2848
2849CONSTANT:
2850    ``CONFIGURE_IMFS_DISABLE_MKNOD``
2851
2852DATA TYPE:
2853    Boolean feature macro.
2854
2855RANGE:
2856    Defined or undefined.
2857
2858DEFAULT VALUE:
2859    This is not defined by default.
2860
2861DESCRIPTION:
2862    In case this configuration option is defined, then the support to make
2863    directories, devices, regular files and FIFOs is disabled in the root IMFS.
2864
2865.. COMMENT: === CONFIGURE_IMFS_DISABLE_MKNOD_FILE ===
2866
2867.. _Disable Make Files Support of Root IMFS:
2868
2869Disable Make Files Support of Root IMFS
2870---------------------------------------
2871.. index:: CONFIGURE_IMFS_DISABLE_MKNOD_FILE
2872
2873CONSTANT:
2874    ``CONFIGURE_IMFS_DISABLE_MKNOD_FILE``
2875
2876DATA TYPE:
2877    Boolean feature macro.
2878
2879RANGE:
2880    Defined or undefined.
2881
2882DEFAULT VALUE:
2883    This is not defined by default.
2884
2885DESCRIPTION:
2886    In case this configuration option is defined, then the support to make
2887    regular files is disabled in the root IMFS.
2888
2889.. COMMENT: === CONFIGURE_IMFS_DISABLE_RMNOD ===
2890
2891.. _Disable Remove Nodes Support of Root IMFS:
2892
2893Disable Remove Nodes Support of Root IMFS
2894-----------------------------------------
2895.. index:: CONFIGURE_IMFS_DISABLE_RMNOD
2896
2897CONSTANT:
2898    ``CONFIGURE_IMFS_DISABLE_RMNOD``
2899
2900DATA TYPE:
2901    Boolean feature macro.
2902
2903RANGE:
2904    Defined or undefined.
2905
2906DEFAULT VALUE:
2907    This is not defined by default.
2908
2909DESCRIPTION:
2910    In case this configuration option is defined, then the support to remove
2911    nodes is disabled in the root IMFS.
2912
2913.. COMMENT: === Block Device Cache Configuration ===
2914
2915Block Device Cache Configuration
2916================================
2917
2918This section defines Block Device Cache (bdbuf) related configuration
2919parameters.
2920
2921.. COMMENT: === CONFIGURE_APPLICATION_NEEDS_LIBBLOCK ===
2922
2923.. _Enable Block Device Cache:
2924
2925Enable Block Device Cache
2926-------------------------
2927.. index:: CONFIGURE_APPLICATION_NEEDS_LIBBLOCK
2928
2929CONSTANT:
2930    ``CONFIGURE_APPLICATION_NEEDS_LIBBLOCK``
2931
2932DATA TYPE:
2933    Boolean feature macro.
2934
2935RANGE:
2936    Defined or undefined.
2937
2938DEFAULT VALUE:
2939    This is not defined by default.
2940
2941DESCRIPTION:
2942    Provides a Block Device Cache configuration.
2943
2944NOTES:
2945    Each option of the Block Device Cache configuration can be explicitly set
2946    by the user with the configuration options below.  The Block Device Cache
2947    is used for example by the RFS and DOSFS file systems.
2948
2949.. COMMENT: === CONFIGURE_BDBUF_CACHE_MEMORY_SIZE ===
2950
2951.. _Size of the Cache Memory:
2952
2953Size of the Cache Memory
2954------------------------
2955.. index:: CONFIGURE_BDBUF_CACHE_MEMORY_SIZE
2956
2957CONSTANT:
2958    ``CONFIGURE_BDBUF_CACHE_MEMORY_SIZE``
2959
2960DATA TYPE:
2961    Unsigned integer (``size_t``).
2962
2963RANGE:
2964    Positive.
2965
2966DEFAULT VALUE:
2967    The default value is 32768 bytes.
2968
2969DESCRIPTION:
2970    Size of the cache memory in bytes.
2971
2972NOTES:
2973    None.
2974
2975.. COMMENT: === CONFIGURE_BDBUF_BUFFER_MIN_SIZE ===
2976
2977.. _Minimum Size of a Buffer:
2978
2979Minimum Size of a Buffer
2980------------------------
2981.. index:: CONFIGURE_BDBUF_BUFFER_MIN_SIZE
2982
2983CONSTANT:
2984    ``CONFIGURE_BDBUF_BUFFER_MIN_SIZE``
2985
2986DATA TYPE:
2987    Unsigned integer (``uint32_t``).
2988
2989RANGE:
2990    Positive.
2991
2992DEFAULT VALUE:
2993    The default value is 512 bytes.
2994
2995DESCRIPTION:
2996    Defines the minimum size of a buffer in bytes.
2997
2998NOTES:
2999    None.
3000
3001.. COMMENT: === CONFIGURE_BDBUF_BUFFER_MAX_SIZE ===
3002
3003.. _Maximum Size of a Buffer:
3004
3005Maximum Size of a Buffer
3006------------------------
3007.. index:: CONFIGURE_BDBUF_BUFFER_MAX_SIZE
3008
3009CONSTANT:
3010    ``CONFIGURE_BDBUF_BUFFER_MAX_SIZE``
3011
3012DATA TYPE:
3013    Unsigned integer (``uint32_t``).
3014
3015RANGE:
3016    It must be positive and an integral multiple of the buffer minimum size.
3017
3018DEFAULT VALUE:
3019    The default value is 4096 bytes.
3020
3021DESCRIPTION:
3022    Defines the maximum size of a buffer in bytes.
3023
3024NOTES:
3025    None.
3026
3027.. COMMENT: === CONFIGURE_SWAPOUT_SWAP_PERIOD ===
3028
3029.. _Swapout Task Swap Period:
3030
3031Swapout Task Swap Period
3032------------------------
3033.. index:: CONFIGURE_SWAPOUT_SWAP_PERIOD
3034
3035CONSTANT:
3036    ``CONFIGURE_SWAPOUT_SWAP_PERIOD``
3037
3038DATA TYPE:
3039    Unsigned integer (``uint32_t``).
3040
3041RANGE:
3042    Positive.
3043
3044DEFAULT VALUE:
3045    The default value is 250 milliseconds.
3046
3047DESCRIPTION:
3048    Defines the swapout task swap period in milliseconds.
3049
3050NOTES:
3051    None.
3052
3053.. COMMENT: === CONFIGURE_SWAPOUT_BLOCK_HOLD ===
3054
3055.. _Swapout Task Maximum Block Hold Time:
3056
3057Swapout Task Maximum Block Hold Time
3058------------------------------------
3059.. index:: CONFIGURE_SWAPOUT_BLOCK_HOLD
3060
3061CONSTANT:
3062    ``CONFIGURE_SWAPOUT_BLOCK_HOLD``
3063
3064DATA TYPE:
3065    Unsigned integer (``uint32_t``).
3066
3067RANGE:
3068    Positive.
3069
3070DEFAULT VALUE:
3071    The default value is 1000 milliseconds.
3072
3073DESCRIPTION:
3074    Defines the swapout task maximum block hold time in milliseconds.
3075
3076NOTES:
3077    None.
3078
3079.. COMMENT: === CONFIGURE_SWAPOUT_TASK_PRIORITY ===
3080
3081.. _Swapout Task Priority:
3082
3083Swapout Task Priority
3084---------------------
3085.. index:: CONFIGURE_SWAPOUT_TASK_PRIORITY
3086
3087CONSTANT:
3088    ``CONFIGURE_SWAPOUT_TASK_PRIORITY``
3089
3090DATA TYPE:
3091    Task priority (``rtems_task_priority``).
3092
3093RANGE:
3094    Valid task priority.
3095
3096DEFAULT VALUE:
3097    The default value is 15.
3098
3099DESCRIPTION:
3100    Defines the swapout task priority.
3101
3102NOTES:
3103    None.
3104
3105.. COMMENT: === CONFIGURE_BDBUF_MAX_READ_AHEAD_BLOCKS ===
3106
3107.. _Maximum Blocks per Read-Ahead Request:
3108
3109Maximum Blocks per Read-Ahead Request
3110-------------------------------------
3111.. index:: CONFIGURE_BDBUF_MAX_READ_AHEAD_BLOCKS
3112
3113CONSTANT:
3114    ``CONFIGURE_BDBUF_MAX_READ_AHEAD_BLOCKS``
3115
3116DATA TYPE:
3117    Unsigned integer (``uint32_t``).
3118
3119RANGE:
3120    Positive.
3121
3122DEFAULT VALUE:
3123    The default value is 0.
3124
3125DESCRIPTION:
3126    Defines the maximum blocks per read-ahead request.
3127
3128NOTES:
3129    A value of 0 disables the read-ahead task (default).  The read-ahead task
3130    will issue speculative read transfers if a sequential access pattern is
3131    detected.  This can improve the performance on some systems.
3132
3133.. COMMENT: === CONFIGURE_BDBUF_MAX_WRITE_BLOCKS ===
3134
3135.. _Maximum Blocks per Write Request:
3136
3137Maximum Blocks per Write Request
3138--------------------------------
3139.. index:: CONFIGURE_BDBUF_MAX_WRITE_BLOCKS
3140
3141CONSTANT:
3142    ``CONFIGURE_BDBUF_MAX_WRITE_BLOCKS``
3143
3144DATA TYPE:
3145    Unsigned integer (``uint32_t``).
3146
3147RANGE:
3148    Positive.
3149
3150DEFAULT VALUE:
3151    The default value is 16.
3152
3153DESCRIPTION:
3154    Defines the maximum blocks per write request.
3155
3156NOTES:
3157    None.
3158
3159.. COMMENT: === CONFIGURE_BDBUF_TASK_STACK_SIZE ===
3160
3161.. _Task Stack Size of the Block Device Cache Tasks:
3162
3163Task Stack Size of the Block Device Cache Tasks
3164-----------------------------------------------
3165.. index:: CONFIGURE_BDBUF_TASK_STACK_SIZE
3166
3167CONSTANT:
3168    ``CONFIGURE_BDBUF_TASK_STACK_SIZE``
3169
3170DATA TYPE:
3171    Unsigned integer (``size_t``).
3172
3173RANGE:
3174    Zero or positive.
3175
3176DEFAULT VALUE:
3177    The default value is RTEMS_MINIMUM_STACK_SIZE.
3178
3179DESCRIPTION:
3180    Defines the task stack size of the Block Device Cache tasks in bytes.
3181
3182NOTES:
3183    None.
3184
3185.. COMMENT: === CONFIGURE_BDBUF_READ_AHEAD_TASK_PRIORITY ===
3186
3187.. _Read-Ahead Task Priority:
3188
3189Read-Ahead Task Priority
3190------------------------
3191.. index:: CONFIGURE_BDBUF_READ_AHEAD_TASK_PRIORITY
3192
3193CONSTANT:
3194    ``CONFIGURE_BDBUF_READ_AHEAD_TASK_PRIORITY``
3195
3196DATA TYPE:
3197    Task priority (``rtems_task_priority``).
3198
3199RANGE:
3200    Valid task priority.
3201
3202DEFAULT VALUE:
3203    The default value is 15.
3204
3205DESCRIPTION:
3206    Defines the read-ahead task priority.
3207
3208NOTES:
3209    None.
3210
3211.. COMMENT: === CONFIGURE_SWAPOUT_WORKER_TASKS ===
3212
3213.. _Swapout Worker Task Count:
3214
3215Swapout Worker Task Count
3216-------------------------
3217.. index:: CONFIGURE_SWAPOUT_WORKER_TASKS
3218
3219CONSTANT:
3220    ``CONFIGURE_SWAPOUT_WORKER_TASKS``
3221
3222DATA TYPE:
3223    Unsigned integer (``size_t``).
3224
3225RANGE:
3226    Zero or positive.
3227
3228DEFAULT VALUE:
3229    The default value is 0.
3230
3231DESCRIPTION:
3232    Defines the swapout worker task count.
3233
3234NOTES:
3235    None.
3236
3237.. COMMENT: === CONFIGURE_SWAPOUT_WORKER_TASK_PRIORITY ===
3238
3239.. _Swapout Worker Task Priority:
3240
3241Swapout Worker Task Priority
3242----------------------------
3243.. index:: CONFIGURE_SWAPOUT_WORKER_TASK_PRIORITY
3244
3245CONSTANT:
3246    ``CONFIGURE_SWAPOUT_WORKER_TASK_PRIORITY``
3247
3248DATA TYPE:
3249    Task priority (``rtems_task_priority``).
3250
3251RANGE:
3252    Valid task priority.
3253
3254DEFAULT VALUE:
3255    The default value is 15.
3256
3257DESCRIPTION:
3258    Defines the swapout worker task priority.
3259
3260NOTES:
3261    None.
3262
3263.. COMMENT: === BSP Specific Settings ===
3264
3265BSP Specific Settings
3266=====================
3267
3268This section describes BSP specific configuration settings used by
3269``<rtems/confdefs.h>``.  The BSP specific configuration settings are defined in
3270``<bsp.h>``.
3271
3272.. COMMENT: === Disable BSP Settings ===
3273
3274.. _Disable BSP Configuration Settings:
3275
3276Disable BSP Configuration Settings
3277----------------------------------
3278.. index:: CONFIGURE_DISABLE_BSP_SETTINGS
3279
3280CONSTANT:
3281    ``CONFIGURE_DISABLE_BSP_SETTINGS``
3282
3283DATA TYPE:
3284    Boolean feature macro.
3285
3286RANGE:
3287    Defined or undefined.
3288
3289DEFAULT VALUE:
3290    This is not defined by default.
3291
3292DESCRIPTION:
3293    All BSP specific configuration settings can be disabled by the application
3294    with the ``CONFIGURE_DISABLE_BSP_SETTINGS`` option.
3295
3296NOTES:
3297    None.
3298
3299.. COMMENT: === CONFIGURE_MALLOC_BSP_SUPPORTS_SBRK ===
3300
3301.. _Specify BSP Supports sbrk():
3302
3303Specify BSP Supports sbrk()
3304---------------------------
3305.. index:: CONFIGURE_MALLOC_BSP_SUPPORTS_SBRK
3306
3307CONSTANT:
3308    ``CONFIGURE_MALLOC_BSP_SUPPORTS_SBRK``
3309
3310DATA TYPE:
3311    Boolean feature macro.
3312
3313RANGE:
3314    Defined or undefined.
3315
3316DEFAULT VALUE:
3317    This option is BSP specific.
3318
3319DESCRIPTION:
3320    This configuration parameter is defined by a BSP to indicate that it does
3321    not allocate all available memory to the C Program Heap used by the Malloc
3322    Family of routines.
3323
3324    If defined, when ``malloc()`` is unable to allocate memory, it will call
3325    the BSP supplied ``sbrk()`` to obtain more memory.
3326
3327NOTES:
3328    This parameter should not be defined by the application. Only the BSP knows
3329    how it allocates memory to the C Program Heap.
3330
3331.. COMMENT: === BSP_IDLE_TASK_BODY ===
3332
3333.. _Specify BSP Specific Idle Task:
3334
3335Specify BSP Specific Idle Task
3336------------------------------
3337.. index:: BSP_IDLE_TASK_BODY
3338
3339CONSTANT:
3340    ``BSP_IDLE_TASK_BODY``
3341
3342DATA TYPE:
3343    Function pointer.
3344
3345RANGE:
3346    Undefined or valid function pointer.
3347
3348DEFAULT VALUE:
3349    This option is BSP specific.
3350
3351DESCRIPTION:
3352    If ``BSP_IDLE_TASK_BODY`` is defined by the BSP and
3353    ``CONFIGURE_IDLE_TASK_BODY`` is not defined by the application, then this
3354    BSP specific idle task body will be used.
3355
3356NOTES:
3357    As it has knowledge of the specific CPU model, system controller logic, and
3358    peripheral buses, a BSP specific IDLE task may be capable of turning
3359    components off to save power during extended periods of no task activity
3360
3361.. COMMENT: === BSP_IDLE_TASK_STACK_SIZE ===
3362
3363.. _Specify BSP Suggested Value for IDLE Task Stack Size:
3364
3365Specify BSP Suggested Value for IDLE Task Stack Size
3366----------------------------------------------------
3367.. index:: BSP_IDLE_TASK_STACK_SIZE
3368
3369CONSTANT:
3370    ``BSP_IDLE_TASK_STACK_SIZE``
3371
3372DATA TYPE:
3373    Unsigned integer (``size_t``).
3374
3375RANGE:
3376    Undefined or positive.
3377
3378DEFAULT VALUE:
3379    This option is BSP specific.
3380
3381DESCRIPTION:
3382    If ``BSP_IDLE_TASK_STACK_SIZE`` is defined by the BSP and
3383    ``CONFIGURE_IDLE_TASK_STACK_SIZE`` is not defined by the application, then
3384    this BSP suggested idle task stack size will be used.
3385
3386NOTES:
3387    The order of precedence for configuring the IDLE task stack size is:
3388
3389    - RTEMS default minimum stack size.
3390
3391    - If defined, then ``CONFIGURE_MINIMUM_TASK_STACK_SIZE``.
3392
3393    - If defined, then the BSP specific ``BSP_IDLE_TASK_SIZE``.
3394
3395    - If defined, then the application specified ``CONFIGURE_IDLE_TASK_SIZE``.
3396
3397.. COMMENT: XXX - add cross references to other related values.
3398
3399.. COMMENT: === BSP_INITIAL_EXTENSION ===
3400
3401.. _Specify BSP Specific User Extensions:
3402
3403Specify BSP Specific User Extensions
3404------------------------------------
3405.. index:: BSP_INITIAL_EXTENSION
3406
3407CONSTANT:
3408    ``BSP_INITIAL_EXTENSION``
3409
3410DATA TYPE:
3411    List of user extension initializers (``rtems_extensions_table``).
3412
3413RANGE:
3414    Undefined or a list of user extension initializers.
3415
3416DEFAULT VALUE:
3417    This option is BSP specific.
3418
3419DESCRIPTION:
3420    If ``BSP_INITIAL_EXTENSION`` is defined by the BSP, then this BSP specific
3421    initial extension will be placed as the last entry in the initial extension
3422    table.
3423
3424NOTES:
3425    None.
3426
3427.. COMMENT: === BSP_INTERRUPT_STACK_SIZE ===
3428
3429.. _Specifying BSP Specific Interrupt Stack Size:
3430
3431Specifying BSP Specific Interrupt Stack Size
3432--------------------------------------------
3433.. index:: BSP_INTERRUPT_STACK_SIZE
3434
3435CONSTANT:
3436    ``BSP_INTERRUPT_STACK_SIZE``
3437
3438DATA TYPE:
3439    Unsigned integer (``size_t``).
3440
3441RANGE:
3442    Undefined or positive.
3443
3444DEFAULT VALUE:
3445    This option is BSP specific.
3446
3447DESCRIPTION:
3448    If ``BSP_INTERRUPT_STACK_SIZE`` is defined by the BSP and
3449    ``CONFIGURE_INTERRUPT_STACK_SIZE`` is not defined by the application, then
3450    this BSP specific interrupt stack size will be used.
3451
3452NOTES:
3453    None.
3454
3455.. COMMENT: === BSP_MAXIMUM_DEVICES ===
3456
3457.. _Specifying BSP Specific Maximum Devices:
3458
3459Specifying BSP Specific Maximum Devices
3460---------------------------------------
3461.. index:: BSP_MAXIMUM_DEVICES
3462
3463CONSTANT:
3464    ``BSP_MAXIMUM_DEVICES``
3465
3466DATA TYPE:
3467    Unsigned integer (``size_t``).
3468
3469RANGE:
3470    Undefined or positive.
3471
3472DEFAULT VALUE:
3473    This option is BSP specific.
3474
3475DESCRIPTION:
3476    If ``BSP_MAXIMUM_DEVICES`` is defined by the BSP and
3477    ``CONFIGURE_MAXIMUM_DEVICES`` is not defined by the application, then this
3478    BSP specific maximum device count will be used.
3479
3480NOTES:
3481    This option is specific to the device file system (devFS) and should not be
3482    confused with the ``CONFIGURE_MAXIMUM_DRIVERS`` option.  This parameter
3483    only impacts the devFS and thus is only used by ``<rtems/confdefs.h>`` when
3484    ``CONFIGURE_USE_DEVFS_AS_BASE_FILESYSTEM`` is specified.
3485
3486.. COMMENT: === BSP_ZERO_WORKSPACE_AUTOMATICALLY ===
3487
3488.. _BSP Recommends RTEMS Workspace be Cleared:
3489
3490BSP Recommends RTEMS Workspace be Cleared
3491-----------------------------------------
3492.. index:: BSP_ZERO_WORKSPACE_AUTOMATICALLY
3493
3494CONSTANT:
3495    ``BSP_ZERO_WORKSPACE_AUTOMATICALLY``
3496
3497DATA TYPE:
3498    Boolean feature macro.
3499
3500RANGE:
3501    Defined or undefined.
3502
3503DEFAULT VALUE:
3504    This option is BSP specific.
3505
3506DESCRIPTION:
3507    If ``BSP_ZERO_WORKSPACE_AUTOMATICALLY`` is defined by the BSP and
3508    ``CONFIGURE_ZERO_WORKSPACE_AUTOMATICALLY`` is not defined by the
3509    application, then the workspace will be zeroed automatically.
3510
3511NOTES:
3512    Zeroing memory can add significantly to system boot time. It is not
3513    necessary for RTEMS but is often assumed by support libraries.
3514
3515.. COMMENT: === CONFIGURE_BSP_PREREQUISITE_DRIVERS ===
3516
3517.. _Specify BSP Prerequisite Drivers:
3518
3519Specify BSP Prerequisite Drivers
3520--------------------------------
3521.. index:: CONFIGURE_BSP_PREREQUISITE_DRIVERS
3522
3523CONSTANT:
3524    ``CONFIGURE_BSP_PREREQUISITE_DRIVERS``
3525
3526DATA TYPE:
3527    List of device driver initializers (``rtems_driver_address_table``).
3528
3529RANGE:
3530    Undefined or array of device drivers.
3531
3532DEFAULT VALUE:
3533    This option is BSP specific.
3534
3535DESCRIPTION:
3536    ``CONFIGURE_BSP_PREREQUISITE_DRIVERS`` is defined if the BSP has device
3537    drivers it needs to include in the Device Driver Table.  This should be
3538    defined to the set of device driver entries that will be placed in the
3539    table at the *FRONT* of the Device Driver Table and initialized before any
3540    other drivers *INCLUDING* any application prerequisite drivers.
3541
3542NOTES:
3543    ``CONFIGURE_BSP_PREREQUISITE_DRIVERS`` is typically used by BSPs to
3544    configure common infrastructure such as bus controllers or probe for
3545    devices.
3546
3547.. COMMENT: === Idle Task Configuration ===
3548
3549Idle Task Configuration
3550=======================
3551
3552This section defines the IDLE task related configuration parameters supported
3553by ``<rtems/confdefs.h>``.
3554
3555.. COMMENT: === CONFIGURE_IDLE_TASK_BODY ===
3556
3557.. _Specify Application Specific Idle Task Body:
3558
3559Specify Application Specific Idle Task Body
3560-------------------------------------------
3561.. index:: CONFIGURE_IDLE_TASK_BODY
3562
3563CONSTANT:
3564    ``CONFIGURE_IDLE_TASK_BODY``
3565
3566DATA TYPE:
3567    Function pointer.
3568
3569RANGE:
3570    Undefined or valid function pointer.
3571
3572DEFAULT VALUE:
3573    This is not defined by default.
3574
3575DESCRIPTION:
3576    ``CONFIGURE_IDLE_TASK_BODY`` is set to the function name corresponding to
3577    the application specific IDLE thread body.  If not specified, the BSP or
3578    RTEMS default IDLE thread body will be used.
3579
3580NOTES:
3581    None.
3582
3583.. COMMENT: === CONFIGURE_IDLE_TASK_STACK_SIZE ===
3584
3585.. _Specify Idle Task Stack Size:
3586
3587Specify Idle Task Stack Size
3588----------------------------
3589.. index:: CONFIGURE_IDLE_TASK_STACK_SIZE
3590
3591CONSTANT:
3592    ``CONFIGURE_IDLE_TASK_STACK_SIZE``
3593
3594DATA TYPE:
3595    Unsigned integer (``size_t``).
3596
3597RANGE:
3598    Undefined or positive.
3599
3600DEFAULT VALUE:
3601    The default value is RTEMS_MINIMUM_STACK_SIZE.
3602
3603DESCRIPTION:
3604    ``CONFIGURE_IDLE_TASK_STACK_SIZE`` is set to the desired stack size for the
3605    IDLE task.
3606
3607NOTES:
3608    None.
3609
3610.. COMMENT: === CONFIGURE_IDLE_TASK_INITIALIZES_APPLICATION ===
3611
3612.. _Specify Idle Task Performs Application Initialization:
3613
3614Specify Idle Task Performs Application Initialization
3615-----------------------------------------------------
3616.. index:: CONFIGURE_IDLE_TASK_INITIALIZES_APPLICATION
3617
3618CONSTANT:
3619    ``CONFIGURE_IDLE_TASK_INITIALIZES_APPLICATION``
3620
3621DATA TYPE:
3622    Boolean feature macro.
3623
3624RANGE:
3625    Defined or undefined.
3626
3627DEFAULT VALUE:
3628    This is not defined by default, the user is assumed to provide one or more
3629    initialization tasks.
3630
3631DESCRIPTION:
3632    ``CONFIGURE_IDLE_TASK_INITIALIZES_APPLICATION`` is set to indicate that the
3633    user has configured *NO* user initialization tasks or threads and that the
3634    user provided IDLE task will perform application initialization and then
3635    transform itself into an IDLE task.
3636
3637NOTES:
3638    If you use this option be careful, the user IDLE task *CANNOT* block at all
3639    during the initialization sequence.  Further, once application
3640    initialization is complete, it must make itself preemptible and enter an
3641    IDLE body loop.
3642
3643    The IDLE task must run at the lowest priority of all tasks in the system.
3644
3645.. COMMENT: === Scheduler Algorithm Configuration ===
3646
3647Scheduler Algorithm Configuration
3648=================================
3649
3650This section defines the configuration parameters related to selecting a
3651scheduling algorithm for an application.  For the schedulers built into RTEMS,
3652the configuration is straightforward.  All that is required is to define the
3653configuration macro which specifies which scheduler you want for in your
3654application.  The currently available schedulers are:
3655
3656The pluggable scheduler interface also enables the user to provide their own
3657scheduling algorithm.  If you choose to do this, you must define multiple
3658configuration macros.
3659
3660.. COMMENT: === CONFIGURE_SCHEDULER_PRIORITY ===
3661
3662.. _Use Deterministic Priority Scheduler:
3663
3664Use Deterministic Priority Scheduler
3665------------------------------------
3666.. index:: CONFIGURE_SCHEDULER_PRIORITY
3667
3668CONSTANT:
3669    ``CONFIGURE_SCHEDULER_PRIORITY``
3670
3671DATA TYPE:
3672    Boolean feature macro.
3673
3674RANGE:
3675    Defined or undefined.
3676
3677DEFAULT VALUE:
3678    This is defined by default.  This is the default scheduler and specifying
3679    this configuration parameter is redundant.
3680
3681DESCRIPTION:
3682    The Deterministic Priority Scheduler is the default scheduler in RTEMS for
3683    uni-processor applications and is designed for predictable performance
3684    under the highest loads.  It can block or unblock a thread in a constant
3685    amount of time.  This scheduler requires a variable amount of memory based
3686    upon the number of priorities configured in the system.
3687
3688NOTES:
3689    This scheduler may be explicitly selected by defining
3690    ``CONFIGURE_SCHEDULER_PRIORITY`` although this is equivalent to the default
3691    behavior.
3692
3693.. COMMENT: === CONFIGURE_SCHEDULER_SIMPLE ===
3694
3695.. _Use Simple Priority Scheduler:
3696
3697Use Simple Priority Scheduler
3698-----------------------------
3699.. index:: CONFIGURE_SCHEDULER_SIMPLE
3700
3701CONSTANT:
3702    ``CONFIGURE_SCHEDULER_SIMPLE``
3703
3704DATA TYPE:
3705    Boolean feature macro.
3706
3707RANGE:
3708    Defined or undefined.
3709
3710DEFAULT VALUE:
3711    This is not defined by default.
3712
3713DESCRIPTION:
3714    When defined, the Simple Priority Scheduler is used at the thread
3715    scheduling algorithm. This is an alternative scheduler in RTEMS.  It is
3716    designed to provide the same task scheduling behaviour as the Deterministic
3717    Priority Scheduler while being simpler in implementation and uses less
3718    memory for data management.  It maintains a single sorted list of all ready
3719    threads.  Thus blocking or unblocking a thread is not a constant time
3720    operation with this scheduler.
3721
3722    This scheduler may be explicitly selected by defining
3723    ``CONFIGURE_SCHEDULER_SIMPLE``.
3724
3725NOTES:
3726    This scheduler is appropriate for use in small systems where RAM is limited.
3727
3728.. COMMENT: === CONFIGURE_SCHEDULER_EDF ===
3729
3730.. _Use Earliest Deadline First Scheduler:
3731
3732Use Earliest Deadline First Scheduler
3733-------------------------------------
3734.. index:: CONFIGURE_SCHEDULER_EDF
3735
3736CONSTANT:
3737    ``CONFIGURE_SCHEDULER_EDF``
3738
3739DATA TYPE:
3740    Boolean feature macro.
3741
3742RANGE:
3743    Defined or undefined.
3744
3745DEFAULT VALUE:
3746    This is not defined by default.
3747
3748DESCRIPTION:
3749    The Earliest Deadline First Scheduler (EDF) is an alternative scheduler in
3750    RTEMS for uni-processor applications. The EDF schedules tasks with dynamic
3751    priorities equal to deadlines. The deadlines are declared using only Rate
3752    Monotonic manager which handles periodic behavior.  Period is always equal
3753    to deadline. If a task does not have any deadline declared or the deadline
3754    is cancelled, the task is considered a background task which is scheduled
3755    in case no deadline-driven tasks are ready to run.  Moreover, multiple
3756    background tasks are scheduled according their priority assigned upon
3757    initialization. All ready tasks reside in a single ready queue.
3758
3759    This scheduler may be explicitly selected by defining
3760    ``CONFIGURE_SCHEDULER_EDF``.
3761
3762NOTES:
3763    None.
3764
3765.. COMMENT: === CONFIGURE_SCHEDULER_CBS ===
3766
3767.. _Use Constant Bandwidth Server Scheduler:
3768
3769Use Constant Bandwidth Server Scheduler
3770---------------------------------------
3771.. index:: CONFIGURE_SCHEDULER_CBS
3772
3773CONSTANT:
3774    ``CONFIGURE_SCHEDULER_CBS``
3775
3776DATA TYPE:
3777    Boolean feature macro.
3778
3779RANGE:
3780    Defined or undefined.
3781
3782DEFAULT VALUE:
3783    This is not defined by default.
3784
3785DESCRIPTION:
3786    The Constant Bandwidth Server Scheduler (CBS) is an alternative scheduler
3787    in RTEMS for uni-processor applications. The CBS is a budget aware
3788    extension of EDF scheduler. The goal of this scheduler is to ensure
3789    temporal isolation of tasks. The CBS is equipped with a set of additional
3790    rules and provides with an extensive API.
3791
3792    This scheduler may be explicitly selected by defining
3793    ``CONFIGURE_SCHEDULER_CBS``.
3794
3795.. COMMENT: XXX - add cross reference to API chapter
3796
3797NOTES:
3798    None.
3799
3800.. COMMENT: === CONFIGURE_SCHEDULER_PRIORITY_SMP ===
3801
3802.. _Use Deterministic Priority SMP Scheduler:
3803
3804Use Deterministic Priority SMP Scheduler
3805----------------------------------------
3806.. index:: CONFIGURE_SCHEDULER_PRIORITY_SMP
3807
3808CONSTANT:
3809    ``CONFIGURE_SCHEDULER_PRIORITY_SMP``
3810
3811DATA TYPE:
3812    Boolean feature macro.
3813
3814RANGE:
3815    Defined or undefined.
3816
3817DEFAULT VALUE:
3818    This is not defined by default.
3819
3820DESCRIPTION:
3821    The Deterministic Priority SMP Scheduler is derived from the Deterministic
3822    Priority Scheduler but is capable of scheduling threads across multiple
3823    processors.
3824
3825    In a configuration with SMP enabled at configure time, it may be explicitly
3826    selected by defining ``CONFIGURE_SCHEDULER_PRIORITY_SMP``.
3827
3828NOTES:
3829    This scheduler is only available when RTEMS is configured with SMP support
3830    enabled.
3831
3832    This scheduler is currently the default in SMP configurations and is only
3833    selected when ``CONFIGURE_SMP_APPLICATION`` is defined.
3834
3835.. COMMENT: === CONFIGURE_SCHEDULER_SIMPLE_SMP ===
3836
3837.. _Use Simple SMP Priority Scheduler:
3838
3839Use Simple SMP Priority Scheduler
3840---------------------------------
3841.. index:: CONFIGURE_SCHEDULER_SIMPLE_SMP
3842
3843CONSTANT:
3844    ``CONFIGURE_SCHEDULER_SIMPLE_SMP``
3845
3846DATA TYPE:
3847    Boolean feature macro.
3848
3849RANGE:
3850    Defined or undefined.
3851
3852DEFAULT VALUE:
3853    This is not defined by default.
3854
3855DESCRIPTION:
3856    The Simple SMP Priority Scheduler is derived from the Simple Priority
3857    Scheduler but is capable of scheduling threads across multiple processors.
3858    It is designed to provide the same task scheduling behaviour as the
3859    Deterministic Priority Scheduler while distributing threads across multiple
3860    processors.  Being based upon the Simple Priority Scheduler, it also
3861    maintains a single sorted list of all ready threads.  Thus blocking or
3862    unblocking a thread is not a constant time operation with this scheduler.
3863
3864    In addition, when allocating threads to processors, the algorithm is not
3865    constant time. This algorithm was not designed with efficiency as a primary
3866    design goal.  Its primary design goal was to provide an SMP-aware
3867    scheduling algorithm that is simple to understand.
3868
3869    In a configuration with SMP enabled at configure time, it may be explicitly
3870    selected by defining ``CONFIGURE_SCHEDULER_SIMPLE_SMP``.
3871
3872NOTES:
3873    This scheduler is only available when RTEMS is configured with SMP support
3874    enabled.
3875
3876.. COMMENT: === Configuring a Scheduler Name ===
3877
3878.. _Configuring a Scheduler Name:
3879
3880Configuring a Scheduler Name
3881----------------------------
3882.. index:: CONFIGURE_SCHEDULER_NAME
3883
3884CONSTANT:
3885    ``CONFIGURE_SCHEDULER_NAME``
3886
3887DATA TYPE:
3888    RTEMS Name (``rtems_name``).
3889
3890RANGE:
3891    Any value.
3892
3893DEFAULT VALUE:
3894    The default name is
3895      - ``"UCBS"`` for the Uni-Processor CBS scheduler,
3896      - ``"UEDF"`` for the Uni-Processor EDF scheduler,
3897      - ``"UPD "`` for the Uni-Processor Deterministic Priority scheduler,
3898      - ``"UPS "`` for the Uni-Processor Simple Priority scheduler,
3899      - ``"MPA "`` for the Multi-Processor Priority Affinity scheduler, and
3900      - ``"MPD "`` for the Multi-Processor Deterministic Priority scheduler, and
3901      - ``"MPS "`` for the Multi-Processor Simple Priority scheduler.
3902
3903DESCRIPTION:
3904    Schedulers can be identified via ``rtems_scheduler_ident``.  The name of
3905    the scheduler is determined by the configuration.
3906
3907NOTES:
3908    None.
3909
3910.. COMMENT: === Configuring a User Scheduler ===
3911
3912.. _Configuring a User Provided Scheduler:
3913
3914Configuring a User Provided Scheduler
3915-------------------------------------
3916.. index:: CONFIGURE_SCHEDULER_USER
3917
3918CONSTANT:
3919    ``CONFIGURE_SCHEDULER_USER``
3920
3921DATA TYPE:
3922    Boolean feature macro.
3923
3924RANGE:
3925    Defined or undefined.
3926
3927DEFAULT VALUE:
3928    This is not defined by default.
3929
3930DESCRIPTION:
3931    RTEMS allows the application to provide its own task/thread scheduling
3932    algorithm. In order to do this, one must define
3933    ``CONFIGURE_SCHEDULER_USER`` to indicate the application provides its own
3934    scheduling algorithm. If ``CONFIGURE_SCHEDULER_USER`` is defined then the
3935    following additional macros must be defined:
3936
3937    - ``CONFIGURE_SCHEDULER_CONTEXT`` must be defined to a static definition of
3938      the scheduler context of the user scheduler.
3939
3940    - ``CONFIGURE_SCHEDULER_CONTROLS`` must be defined to a scheduler control
3941      initializer for the user scheduler.
3942
3943    - ``CONFIGURE_SCHEDULER_USER_PER_THREAD`` must be defined to the type of
3944      the per-thread information of the user scheduler.
3945
3946NOTES:
3947    At this time, the mechanics and requirements for writing a new scheduler
3948    are evolving and not fully documented.  It is recommended that you look at
3949    the existing Deterministic Priority Scheduler in
3950    ``cpukit/score/src/schedulerpriority*.c`` for guidance.  For guidance on
3951    the configuration macros, please examine ``cpukit/sapi/include/confdefs.h``
3952    for how these are defined for the Deterministic Priority Scheduler.
3953
3954.. COMMENT: === Configuring Clustered Schedulers ===
3955
3956.. _Configuring Clustered Schedulers:
3957
3958Configuring Clustered Schedulers
3959--------------------------------
3960
3961Clustered scheduling helps to control the worst-case latencies in a
3962multi-processor system.  The goal is to reduce the amount of shared state in
3963the system and thus prevention of lock contention.  Modern multi-processor
3964systems tend to have several layers of data and instruction caches.  With
3965clustered scheduling it is possible to honour the cache topology of a system
3966and thus avoid expensive cache synchronization traffic.
3967
3968We have clustered scheduling in case the set of processors of a system is
3969partitioned into non-empty pairwise-disjoint subsets.  These subsets are called
3970clusters.  Clusters with a cardinality of one are partitions.  Each cluster is
3971owned by exactly one scheduler instance.  In order to use clustered scheduling
3972the application designer has to answer two questions.
3973
3974#. How is the set of processors partitioned into clusters?
3975
3976#. Which scheduler is used for which cluster?
3977
3978CONFIGURATION:
3979    The schedulers in an SMP system are statically configured on RTEMS.
3980    Firstly the application must select which scheduling algorithms are
3981    available with the following defines
3982
3983    - ``CONFIGURE_SCHEDULER_PRIORITY_SMP``,
3984
3985    - ``CONFIGURE_SCHEDULER_SIMPLE_SMP``, and
3986
3987    - ``CONFIGURE_SCHEDULER_PRIORITY_AFFINITY_SMP``.
3988
3989    This is necessary to calculate the per-thread overhead introduced by the
3990    schedulers.  After these definitions the configuration file must ``#include
3991    <rtems/scheduler.h>`` to have access to scheduler specific configuration
3992    macros.  Each scheduler needs a context to store state information at
3993    run-time.  To provide a context for each scheduler is the next step.  Use
3994    the following macros to create scheduler contexts
3995
3996    - ``RTEMS_SCHEDULER_CONTEXT_PRIORITY_SMP(name, prio_count)``,
3997
3998    - ``RTEMS_SCHEDULER_CONTEXT_SIMPLE_SMP(name)``, and
3999
4000    - ``RTEMS_SCHEDULER_CONTEXT_PRIORITY_AFFINITY_SMP(name, prio_count)``.
4001
4002    The ``name`` parameter is used as part of a designator for a global
4003    variable, so the usual C/C++ designator rules apply.  Additional parameters
4004    are scheduler specific.  The schedulers are registered in the system via
4005    the scheduler table.  To create the scheduler table define
4006    ``CONFIGURE_SCHEDULER_CONTROLS`` to a list of the following scheduler
4007    control initializers
4008
4009    - ``RTEMS_SCHEDULER_CONTROL_PRIORITY_SMP(name, obj_name)``,
4010
4011    - ``RTEMS_SCHEDULER_CONTROL_SIMPLE_SMP(name, obj_name)``, and
4012
4013    - ``RTEMS_SCHEDULER_CONTROL_PRIORITY_AFFINITY_SMP(name, obj_name)``.
4014
4015    The ``name`` parameter must correspond to the parameter defining the
4016    scheduler context.  The ``obj_name`` determines the scheduler object name
4017    and can be used in ``rtems_scheduler_ident()`` to get the scheduler object
4018    identifier.
4019
4020    The last step is to define which processor uses which scheduler.  For this
4021    purpose a scheduler assignment table must be defined.  The entry count of
4022    this table must be equal to the configured maximum processors
4023    (``CONFIGURE_SMP_MAXIMUM_PROCESSORS``).  A processor assignment to a
4024    scheduler can be optional or mandatory.  The boot processor must have a
4025    scheduler assigned.  In case the system needs more mandatory processors
4026    than available then a fatal run-time error will occur.  To specify the
4027    scheduler assignments define ``CONFIGURE_SMP_SCHEDULER_ASSIGNMENTS`` to a
4028    list of ``RTEMS_SCHEDULER_ASSIGN(index, attr)`` and
4029    ``RTEMS_SCHEDULER_ASSIGN_NO_SCHEDULER`` macros.  The ``index`` parameter
4030    must be a valid index into the scheduler table.  The ``attr`` parameter
4031    defines the scheduler assignment attributes.  By default a scheduler
4032    assignment to a processor is optional.  For the scheduler assignment
4033    attribute use one of the mutually exclusive variants
4034
4035    - ``RTEMS_SCHEDULER_ASSIGN_DEFAULT``,
4036
4037    - ``RTEMS_SCHEDULER_ASSIGN_PROCESSOR_MANDATORY``, and
4038
4039    - ``RTEMS_SCHEDULER_ASSIGN_PROCESSOR_OPTIONAL``.
4040
4041    It is possible to add/remove processors to/from scheduler instances at
4042    run-time, see :ref:`rtems_scheduler_add_processor` and
4043    :ref:`rtems_scheduler_remove_processor`.
4044
4045ERRORS:
4046    In case one of the scheduler indices
4047    in``CONFIGURE_SMP_SCHEDULER_ASSIGNMENTS`` is invalid a link-time error will
4048    occur with an undefined reference to ``RTEMS_SCHEDULER_INVALID_INDEX``.
4049
4050    Some fatal errors may occur in case of scheduler configuration
4051    inconsistencies or a lack of processors on the system.  The fatal source is
4052    ``RTEMS_FATAL_SOURCE_SMP``.  None of the errors is internal.
4053
4054    - ``SMP_FATAL_BOOT_PROCESSOR_NOT_ASSIGNED_TO_SCHEDULER`` - the boot
4055      processor must have a scheduler assigned.
4056
4057    - ``SMP_FATAL_MANDATORY_PROCESSOR_NOT_PRESENT`` - there exists a mandatory
4058      processor beyond the range of physically or virtually available
4059      processors.  The processor demand must be reduced for this system.
4060
4061    - ``SMP_FATAL_START_OF_MANDATORY_PROCESSOR_FAILED`` - the start of a
4062      mandatory processor failed during system initialization.  The system may
4063      not have this processor at all or it could be a problem with a boot
4064      loader for example.  Check the ``CONFIGURE_SMP_SCHEDULER_ASSIGNMENTS``
4065      definition.
4066
4067    - ``SMP_FATAL_MULTITASKING_START_ON_UNASSIGNED_PROCESSOR`` - it is not
4068      allowed to start multitasking on a processor with no scheduler assigned.
4069
4070EXAMPLE:
4071    The following example shows a scheduler configuration for a hypothetical
4072    product using two chip variants.  One variant has four processors which is
4073    used for the normal product line and another provides eight processors for
4074    the high-performance product line.  The first processor performs hard-real
4075    time control of actuators and sensors.  The second processor is not used by
4076    RTEMS at all and runs a Linux instance to provide a graphical user
4077    interface.  The additional processors are used for a worker thread pool to
4078    perform data processing operations.
4079
4080    The processors managed by RTEMS use two Deterministic Priority scheduler
4081    instances capable of dealing with 256 priority levels.  The scheduler with
4082    index zero has the name ``"IO "``.  The scheduler with index one has the
4083    name ``"WORK"``.  The scheduler assignments of the first, third and fourth
4084    processor are mandatory, so the system must have at least four processors,
4085    otherwise a fatal run-time error will occur during system startup.  The
4086    processor assignments for the fifth up to the eighth processor are optional
4087    so that the same application can be used for the normal and
4088    high-performance product lines.  The second processor has no scheduler
4089    assigned and runs Linux.  A hypervisor will ensure that the two systems
4090    cannot interfere in an undesirable way.
4091
4092    .. code-block:: c
4093
4094        #define CONFIGURE_SMP_MAXIMUM_PROCESSORS 8
4095        #define CONFIGURE_MAXIMUM_PRIORITY 255
4096
4097        /* Make the scheduler algorithm available */
4098        #define CONFIGURE_SCHEDULER_PRIORITY_SMP
4099        #include <rtems/scheduler.h>
4100
4101        /* Create contexts for the two scheduler instances */
4102        RTEMS_SCHEDULER_CONTEXT_PRIORITY_SMP(io, CONFIGURE_MAXIMUM_PRIORITY + 1);
4103        RTEMS_SCHEDULER_CONTEXT_PRIORITY_SMP(work, CONFIGURE_MAXIMUM_PRIORITY + 1);
4104
4105        /* Define the scheduler table */
4106        #define CONFIGURE_SCHEDULER_CONTROLS \\
4107            RTEMS_SCHEDULER_CONTROL_PRIORITY_SMP( \
4108                io, \
4109                rtems_build_name('I', 'O', ' ', ' ') \
4110            ), \
4111            RTEMS_SCHEDULER_CONTROL_PRIORITY_SMP( \
4112                work, \
4113                rtems_build_name('W', 'O', 'R', 'K') \
4114            )
4115
4116        /* Define the initial processor to scheduler assignments */
4117        #define CONFIGURE_SMP_SCHEDULER_ASSIGNMENTS \
4118            RTEMS_SCHEDULER_ASSIGN(0, RTEMS_SCHEDULER_ASSIGN_PROCESSOR_MANDATORY), \
4119            RTEMS_SCHEDULER_ASSIGN_NO_SCHEDULER, \
4120            RTEMS_SCHEDULER_ASSIGN(1, RTEMS_SCHEDULER_ASSIGN_PROCESSOR_MANDATORY), \
4121            RTEMS_SCHEDULER_ASSIGN(1, RTEMS_SCHEDULER_ASSIGN_PROCESSOR_MANDATORY), \
4122            RTEMS_SCHEDULER_ASSIGN(1, RTEMS_SCHEDULER_ASSIGN_PROCESSOR_OPTIONAL), \
4123            RTEMS_SCHEDULER_ASSIGN(1, RTEMS_SCHEDULER_ASSIGN_PROCESSOR_OPTIONAL), \
4124            RTEMS_SCHEDULER_ASSIGN(1, RTEMS_SCHEDULER_ASSIGN_PROCESSOR_OPTIONAL), \
4125            RTEMS_SCHEDULER_ASSIGN(1, RTEMS_SCHEDULER_ASSIGN_PROCESSOR_OPTIONAL)
4126
4127.. COMMENT: === SMP Specific Configuration Parameters ===
4128
4129SMP Specific Configuration Parameters
4130=====================================
4131
4132When RTEMS is configured to support SMP target systems, there are other
4133configuration parameters which apply.
4134
4135.. COMMENT: XXX - add -enable-smp
4136
4137.. COMMENT: === CONFIGURE_SMP_APPLICATION ===
4138
4139.. _Enable SMP Support for Applications:
4140
4141Enable SMP Support for Applications
4142-----------------------------------
4143.. index:: CONFIGURE_SMP_APPLICATION
4144
4145CONSTANT:
4146    ``CONFIGURE_SMP_APPLICATION``
4147
4148DATA TYPE:
4149    Boolean feature macro.
4150
4151RANGE:
4152    Defined or undefined.
4153
4154DEFAULT VALUE:
4155    This is not defined by default.
4156
4157DESCRIPTION:
4158    ``CONFIGURE_SMP_APPLICATION`` must be defined to enable SMP support for the
4159    application.
4160
4161NOTES:
4162    This define may go away in the future in case all RTEMS components are SMP
4163    ready.  This configuration define is ignored on uni-processor
4164    configurations.
4165
4166.. COMMENT: === CONFIGURE_SMP_MAXIMUM_PROCESSORS ===
4167
4168.. _Specify Maximum Processors in SMP System:
4169
4170Specify Maximum Processors in SMP System
4171----------------------------------------
4172.. index:: CONFIGURE_SMP_MAXIMUM_PROCESSORS
4173
4174CONSTANT:
4175    ``CONFIGURE_SMP_MAXIMUM_PROCESSORS``
4176
4177DATA TYPE:
4178    Unsigned integer (``uint32_t``).
4179
4180RANGE:
4181    Defined or undefined.
4182
4183DEFAULT VALUE:
4184    The default value is 1, (if CONFIGURE_SMP_APPLICATION is defined).
4185
4186DESCRIPTION:
4187    ``CONFIGURE_SMP_MAXIMUM_PROCESSORS`` must be set to the number of
4188    processors in the SMP configuration.
4189
4190NOTES:
4191    If there are more processors available than configured, the rest will be
4192    ignored.  This configuration define is ignored on uni-processor
4193    configurations.
4194
4195.. COMMENT: === Device Driver Table ===
4196
4197Device Driver Table
4198===================
4199
4200This section defines the configuration parameters related to the automatic
4201generation of a Device Driver Table.  As ``<rtems/confdefs.h>`` only is aware
4202of a small set of standard device drivers, the generated Device Driver Table is
4203suitable for simple applications with no custom device drivers.
4204
4205Note that network device drivers are not configured in the Device Driver Table.
4206
4207.. COMMENT: === CONFIGURE_MAXIMUM_DRIVERS ===
4208
4209.. _Specifying the Maximum Number of Device Drivers:
4210
4211Specifying the Maximum Number of Device Drivers
4212-----------------------------------------------
4213.. index:: CONFIGURE_MAXIMUM_DRIVERS
4214
4215CONSTANT:
4216
4217    ``CONFIGURE_MAXIMUM_DRIVERS``
4218
4219DATA TYPE:
4220    Unsigned integer (``uint32_t``).
4221
4222RANGE:
4223    Zero or positive.
4224
4225DEFAULT VALUE:
4226    This is computed by default, and is set to the number of device drivers
4227    configured using the ``CONFIGURE_APPLICATIONS_NEEDS_XXX_DRIVER``
4228    configuration parameters.
4229
4230DESCRIPTION:
4231    ``CONFIGURE_MAXIMUM_DRIVERS`` is defined as the number of device drivers
4232    per node.
4233
4234NOTES:
4235    If the application will dynamically install device drivers, then this
4236    configuration parameter must be larger than the number of statically
4237    configured device drivers. Drivers configured using the
4238    ``CONFIGURE_APPLICATIONS_NEEDS_XXX_DRIVER`` configuration parameters are
4239    statically installed.
4240
4241.. COMMENT: === CONFIGURE_APPLICATION_NEEDS_CONSOLE_DRIVER ===
4242
4243.. _Enable Console Device Driver:
4244
4245Enable Console Device Driver
4246----------------------------
4247.. index:: CONFIGURE_APPLICATION_NEEDS_CONSOLE_DRIVER
4248
4249CONSTANT:
4250    ``CONFIGURE_APPLICATION_NEEDS_CONSOLE_DRIVER``
4251
4252DATA TYPE:
4253    Boolean feature macro.
4254
4255RANGE:
4256    Defined or undefined.
4257
4258DEFAULT VALUE:
4259    This is not defined by default.
4260
4261DESCRIPTION:
4262    ``CONFIGURE_APPLICATION_NEEDS_CONSOLE_DRIVER`` is defined if the
4263    application wishes to include the Console Device Driver.
4264
4265NOTES:
4266    This device driver is responsible for providing standard input and output
4267    using */dev/console*.
4268
4269    BSPs should be constructed in a manner that allows ``printk()`` to work
4270    properly without the need for the console driver to be configured.
4271
4272.. COMMENT: === CONFIGURE_APPLICATION_NEEDS_CLOCK_DRIVER ===
4273
4274.. _Enable Clock Driver:
4275
4276Enable Clock Driver
4277-------------------
4278.. index:: CONFIGURE_APPLICATION_NEEDS_CLOCK_DRIVER
4279
4280CONSTANT:
4281    ``CONFIGURE_APPLICATION_NEEDS_CLOCK_DRIVER``
4282
4283DATA TYPE:
4284    Boolean feature macro.
4285
4286RANGE:
4287    Defined or undefined.
4288
4289DEFAULT VALUE:
4290    This is not defined by default.
4291
4292DESCRIPTION:
4293    ``CONFIGURE_APPLICATION_NEEDS_CLOCK_DRIVER`` is defined if the application
4294    wishes to include the Clock Device Driver.
4295
4296NOTES:
4297    This device driver is responsible for providing a regular interrupt which
4298    invokes a clock tick directive.
4299
4300    If neither the Clock Driver not Benchmark Timer is enabled and the
4301    configuration parameter
4302    ``CONFIGURE_APPLICATION_DOES_NOT_NEED_CLOCK_DRIVER`` is not defined, then a
4303    compile time error will occur.
4304
4305.. COMMENT: === CONFIGURE_APPLICATION_NEEDS_TIMER_DRIVER ===
4306
4307.. _Enable the Benchmark Timer Driver:
4308
4309Enable the Benchmark Timer Driver
4310---------------------------------
4311.. index:: CONFIGURE_APPLICATION_NEEDS_TIMER_DRIVER
4312
4313CONSTANT:
4314    ``CONFIGURE_APPLICATION_NEEDS_TIMER_DRIVER``
4315
4316DATA TYPE:
4317    Boolean feature macro.
4318
4319RANGE:
4320    Defined or undefined.
4321
4322DEFAULT VALUE:
4323    This is not defined by default.
4324
4325DESCRIPTION:
4326    ``CONFIGURE_APPLICATION_NEEDS_TIMER_DRIVER`` is defined if the application
4327    wishes to include the Timer Driver.  This device driver is used to
4328    benchmark execution times by the RTEMS Timing Test Suites.
4329
4330NOTES:
4331    If neither the Clock Driver not Benchmark Timer is enabled and the
4332    configuration parameter
4333    ``CONFIGURE_APPLICATION_DOES_NOT_NEED_CLOCK_DRIVER`` is not defined, then a
4334    compile time error will occur.
4335
4336.. COMMENT: === CONFIGURE_APPLICATION_DOES_NOT_NEED_CLOCK_DRIVER ===
4337
4338.. _Specify Clock and Benchmark Timer Drivers Are Not Needed:
4339
4340Specify Clock and Benchmark Timer Drivers Are Not Needed
4341--------------------------------------------------------
4342.. index:: CONFIGURE_APPLICATION_DOES_NOT_NEED_CLOCK_DRIVER
4343
4344CONSTANT:
4345    ``CONFIGURE_APPLICATION_DOES_NOT_NEED_CLOCK_DRIVER``
4346
4347DATA TYPE:
4348    Boolean feature macro.
4349
4350RANGE:
4351    Defined or undefined.
4352
4353DEFAULT VALUE:
4354    This is not defined by default.
4355
4356DESCRIPTION:
4357    ``CONFIGURE_APPLICATION_DOES_NOT_NEED_CLOCK_DRIVER`` is defined when the
4358    application does *NOT* want the Clock Device Driver and is *NOT* using the
4359    Timer Driver.  The inclusion or exclusion of the Clock Driver must be
4360    explicit in user applications.
4361
4362NOTES:
4363    This configuration parameter is intended to prevent the common user error
4364    of using the Hello World example as the baseline for an application and
4365    leaving out a clock tick source.
4366
4367.. COMMENT: === CONFIGURE_APPLICATION_NEEDS_RTC_DRIVER ===
4368
4369.. _Enable Real-Time Clock Driver:
4370
4371Enable Real-Time Clock Driver
4372-----------------------------
4373.. index:: CONFIGURE_APPLICATION_NEEDS_RTC_DRIVER
4374
4375CONSTANT:
4376    ``CONFIGURE_APPLICATION_NEEDS_RTC_DRIVER``
4377
4378DATA TYPE:
4379    Boolean feature macro.
4380
4381RANGE:
4382    Defined or undefined.
4383
4384DEFAULT VALUE:
4385    This is not defined by default.
4386
4387DESCRIPTION:
4388    ``CONFIGURE_APPLICATION_NEEDS_RTC_DRIVER`` is defined if the application
4389    wishes to include the Real-Time Clock Driver.
4390
4391NOTES:
4392    Most BSPs do not include support for a real-time clock. This is because
4393    many boards do not include the required hardware.
4394
4395    If this is defined and the BSP does not have this device driver, then the
4396    user will get a link time error for an undefined symbol.
4397
4398.. COMMENT: === CONFIGURE_APPLICATION_NEEDS_WATCHDOG_DRIVER ===
4399
4400.. _Enable the Watchdog Device Driver:
4401
4402Enable the Watchdog Device Driver
4403---------------------------------
4404.. index:: CONFIGURE_APPLICATION_NEEDS_WATCHDOG_DRIVER
4405
4406CONSTANT:
4407    ``CONFIGURE_APPLICATION_NEEDS_WATCHDOG_DRIVER``
4408
4409DATA TYPE:
4410    Boolean feature macro.
4411
4412RANGE:
4413    Defined or undefined.
4414
4415DEFAULT VALUE:
4416    This is not defined by default.
4417
4418DESCRIPTION:
4419    ``CONFIGURE_APPLICATION_NEEDS_WATCHDOG_DRIVER`` is defined if the
4420    application wishes to include the Watchdog Driver.
4421
4422NOTES:
4423    Most BSPs do not include support for a watchdog device driver. This is
4424    because many boards do not include the required hardware.
4425
4426    If this is defined and the BSP does not have this device driver, then the
4427    user will get a link time error for an undefined symbol.
4428
4429.. COMMENT: === CONFIGURE_APPLICATION_NEEDS_FRAME_BUFFER_DRIVER ===
4430
4431.. _Enable the Graphics Frame Buffer Device Driver:
4432
4433Enable the Graphics Frame Buffer Device Driver
4434----------------------------------------------
4435.. index:: CONFIGURE_APPLICATION_NEEDS_FRAME_BUFFER_DRIVER
4436
4437CONSTANT:
4438    ``CONFIGURE_APPLICATION_NEEDS_FRAME_BUFFER_DRIVER``
4439
4440DATA TYPE:
4441    Boolean feature macro.
4442
4443RANGE:
4444    Defined or undefined.
4445
4446DEFAULT VALUE:
4447    This is not defined by default.
4448
4449DESCRIPTION:
4450    ``CONFIGURE_APPLICATION_NEEDS_FRAME_BUFFER_DRIVER`` is defined if the
4451    application wishes to include the BSP's Frame Buffer Device Driver.
4452
4453NOTES:
4454    Most BSPs do not include support for a Frame Buffer Device Driver. This is
4455    because many boards do not include the required hardware.
4456
4457    If this is defined and the BSP does not have this device driver, then the
4458    user will get a link time error for an undefined symbol.
4459
4460.. COMMENT: === CONFIGURE_APPLICATION_NEEDS_STUB_DRIVER ===
4461
4462.. _Enable Stub Device Driver:
4463
4464Enable Stub Device Driver
4465-------------------------
4466.. index:: CONFIGURE_APPLICATION_NEEDS_STUB_DRIVER
4467
4468CONSTANT:
4469    ``CONFIGURE_APPLICATION_NEEDS_STUB_DRIVER``
4470
4471DATA TYPE:
4472    Boolean feature macro.
4473
4474RANGE:
4475    Defined or undefined.
4476
4477DEFAULT VALUE:
4478    This is not defined by default.
4479
4480DESCRIPTION:
4481    ``CONFIGURE_APPLICATION_NEEDS_STUB_DRIVER`` is defined if the application
4482    wishes to include the Stub Device Driver.
4483
4484NOTES:
4485    This device driver simply provides entry points that return successful and
4486    is primarily a test fixture. It is supported by all BSPs.
4487
4488.. COMMENT: === CONFIGURE_APPLICATION_PREREQUISITE_DRIVERS ===
4489
4490.. _Specify Application Prerequisite Device Drivers:
4491
4492Specify Application Prerequisite Device Drivers
4493-----------------------------------------------
4494.. index:: CONFIGURE_APPLICATION_PREREQUISITE_DRIVERS
4495
4496CONSTANT:
4497    ``CONFIGURE_APPLICATION_PREREQUISITE_DRIVERS``
4498
4499DATA TYPE:
4500    device driver entry structures
4501
4502RANGE:
4503    Undefined or set of device driver entry structures
4504
4505DEFAULT VALUE:
4506    This is not defined by default.
4507
4508DESCRIPTION:
4509    ``CONFIGURE_APPLICATION_PREREQUISITE_DRIVERS`` is defined if the
4510    application has device drivers it needs to include in the Device Driver
4511    Table.  This should be defined to the set of device driver entries that
4512    will be placed in the table at the *FRONT* of the Device Driver Table and
4513    initialized before any other drivers *EXCEPT* any BSP prerequisite drivers.
4514
4515NOTES:
4516    In some cases, it is used by System On Chip BSPs to support peripheral
4517    buses beyond those normally found on the System On Chip. For example, this
4518    is used by one RTEMS system which has implemented a SPARC/ERC32 based board
4519    with VMEBus. The VMEBus Controller initialization is performed by a device
4520    driver configured via this configuration parameter.
4521
4522.. COMMENT: XXX Add example
4523
4524.. COMMENT: === CONFIGURE_APPLICATION_EXTRA_DRIVERS ===
4525
4526.. _Specify Extra Application Device Drivers:
4527
4528Specify Extra Application Device Drivers
4529----------------------------------------
4530.. index:: CONFIGURE_APPLICATION_EXTRA_DRIVERS
4531
4532CONSTANT:
4533    ``CONFIGURE_APPLICATION_EXTRA_DRIVERS``
4534
4535DATA TYPE:
4536    device driver entry structures
4537
4538RANGE:
4539    Undefined or set of device driver entry structures
4540
4541DEFAULT VALUE:
4542    This is not defined by default.
4543
4544DESCRIPTION:
4545    ``CONFIGURE_APPLICATION_EXTRA_DRIVERS`` is defined if the application has
4546    device drivers it needs to include in the Device Driver Table.  This should
4547    be defined to the set of device driver entries that will be placed in the
4548    table at the *END* of the Device Driver Table.
4549
4550NOTES:
4551    None.
4552
4553.. COMMENT: === CONFIGURE_APPLICATION_NEEDS_NULL_DRIVER ===
4554
4555.. _Enable /dev/null Device Driver:
4556
4557Enable /dev/null Device Driver
4558------------------------------
4559.. index:: CONFIGURE_APPLICATION_NEEDS_NULL_DRIVER
4560.. index:: /dev/null
4561
4562CONSTANT:
4563    ``CONFIGURE_APPLICATION_NEEDS_NULL_DRIVER``
4564
4565DATA TYPE:
4566    Boolean feature macro.
4567
4568RANGE:
4569    Defined or undefined.
4570
4571DEFAULT VALUE:
4572    This is not defined by default.
4573
4574DESCRIPTION:
4575    This configuration variable is specified to enable ``/dev/null`` device driver.
4576
4577NOTES:
4578    This device driver is supported by all BSPs.
4579
4580.. COMMENT: === CONFIGURE_APPLICATION_NEEDS_ZERO_DRIVER ===
4581
4582.. _Enable /dev/zero Device Driver:
4583
4584Enable /dev/zero Device Driver
4585------------------------------
4586.. index:: CONFIGURE_APPLICATION_NEEDS_ZERO_DRIVER
4587.. index:: /dev/zero
4588
4589CONSTANT:
4590    ``CONFIGURE_APPLICATION_NEEDS_ZERO_DRIVER``
4591
4592DATA TYPE:
4593    Boolean feature macro.
4594
4595RANGE:
4596    Defined or undefined.
4597
4598DEFAULT VALUE:
4599    This is not defined by default.
4600
4601DESCRIPTION:
4602    This configuration variable is specified to enable ``/dev/zero`` device driver.
4603
4604NOTES:
4605    This device driver is supported by all BSPs.
4606
4607.. COMMENT: === CONFIGURE_HAS_OWN_DEVICE_DRIVER_TABLE ===
4608
4609.. _Specifying Application Defined Device Driver Table:
4610
4611Specifying Application Defined Device Driver Table
4612--------------------------------------------------
4613.. index:: CONFIGURE_HAS_OWN_DEVICE_DRIVER_TABLE
4614
4615CONSTANT:
4616    ``CONFIGURE_HAS_OWN_DEVICE_DRIVER_TABLE``
4617
4618DATA TYPE:
4619    Boolean feature macro.
4620
4621RANGE:
4622    Defined or undefined.
4623
4624DEFAULT VALUE:
4625    This is not defined by default, indicating the ``<rtems/confdefs.h>`` is
4626    providing the device driver table.
4627
4628DESCRIPTION:
4629    ``CONFIGURE_HAS_OWN_DEVICE_DRIVER_TABLE`` is defined if the application
4630    wishes to provide their own Device Driver Table.
4631
4632    The table must be an array of ``rtems_driver_address_table`` entries
4633    named`` _IO_Driver_address_table``.  The application must also provide a
4634    const variable ``_IO_Number_of_drivers`` of type ``size_t`` indicating the
4635    number of entries in the ``_IO_Driver_address_table``.
4636
4637NOTES:
4638    It is expected that there the application would only rarely need to do this.
4639
4640.. COMMENT: === Multiprocessing Configuration ===
4641
4642Multiprocessing Configuration
4643=============================
4644
4645This section defines the multiprocessing related system configuration
4646parameters supported by ``<rtems/confdefs.h>``.  They are only used if the
4647Multiprocessing Support (distinct from the SMP support) is enabled at configure
4648time using the ``--enable-multiprocessing`` option.
4649
4650Additionally, this class of Configuration Constants are only applicable if
4651``CONFIGURE_MP_APPLICATION`` is defined.
4652
4653.. COMMENT: === CONFIGURE_MP_APPLICATION ===
4654
4655.. _Specify Application Will Use Multiprocessing:
4656
4657Specify Application Will Use Multiprocessing
4658--------------------------------------------
4659.. index:: CONFIGURE_MP_APPLICATION
4660
4661CONSTANT:
4662    ``CONFIGURE_MP_APPLICATION``
4663
4664DATA TYPE:
4665    Boolean feature macro.
4666
4667RANGE:
4668    Defined or undefined.
4669
4670DEFAULT VALUE:
4671    This is not defined by default.
4672
4673DESCRIPTION:
4674    This configuration parameter must be defined to indicate that the
4675    application intends to be part of a multiprocessing
4676    configuration. Additional configuration parameters are assumed to be
4677    provided.
4678
4679NOTES:
4680    This has no impact unless RTEMS was configured and built using the
4681    ``--enable-multiprocessing`` option.
4682
4683.. COMMENT: === CONFIGURE_MP_NODE_NUMBER ===
4684
4685.. _Configure Node Number in Multiprocessor Configuration:
4686
4687Configure Node Number in Multiprocessor Configuration
4688-----------------------------------------------------
4689.. index:: CONFIGURE_MP_NODE_NUMBER
4690
4691CONSTANT:
4692    ``CONFIGURE_MP_NODE_NUMBER``
4693
4694DATA TYPE:
4695    Unsigned integer (``uint32_t``).
4696
4697RANGE:
4698    Positive.
4699
4700DEFAULT VALUE:
4701    The default value is ``NODE_NUMBER``, which is assumed to be set by the
4702    compilation environment.
4703
4704DESCRIPTION:
4705    ``CONFIGURE_MP_NODE_NUMBER`` is the node number of this node in a
4706    multiprocessor system.
4707
4708NOTES:
4709    In the RTEMS Multiprocessing Test Suite, the node number is derived from
4710    the Makefile variable ``NODE_NUMBER``. The same code is compiled with the
4711    ``NODE_NUMBER`` set to different values. The test programs behave
4712    differently based upon their node number.
4713
4714.. COMMENT: === CONFIGURE_MP_MAXIMUM_NODES ===
4715
4716.. _Configure Maximum Node in Multiprocessor Configuration:
4717
4718Configure Maximum Node in Multiprocessor Configuration
4719------------------------------------------------------
4720.. index:: CONFIGURE_MP_MAXIMUM_NODES
4721
4722CONSTANT:
4723    ``CONFIGURE_MP_MAXIMUM_NODES``
4724
4725DATA TYPE:
4726    Unsigned integer (``uint32_t``).
4727
4728RANGE:
4729    Positive.
4730
4731DEFAULT VALUE:
4732    The default value is 2.
4733
4734DESCRIPTION:
4735    ``CONFIGURE_MP_MAXIMUM_NODES`` is the maximum number of nodes in a
4736    multiprocessor system.
4737
4738NOTES:
4739    None.
4740
4741.. COMMENT: === CONFIGURE_MP_MAXIMUM_GLOBAL_OBJECTS ===
4742
4743.. _Configure Maximum Global Objects in Multiprocessor Configuration:
4744
4745Configure Maximum Global Objects in Multiprocessor Configuration
4746----------------------------------------------------------------
4747.. index:: CONFIGURE_MP_MAXIMUM_GLOBAL_OBJECTS
4748
4749CONSTANT:
4750    ``CONFIGURE_MP_MAXIMUM_GLOBAL_OBJECTS``
4751
4752DATA TYPE:
4753    Unsigned integer (``uint32_t``).
4754
4755RANGE:
4756    Positive.
4757
4758DEFAULT VALUE:
4759    The default value is 32.
4760
4761DESCRIPTION:
4762    ``CONFIGURE_MP_MAXIMUM_GLOBAL_OBJECTS`` is the maximum number of
4763    concurrently active global objects in a multiprocessor system.
4764
4765NOTES:
4766    This value corresponds to the total number of objects which can be created
4767    with the ``RTEMS_GLOBAL`` attribute.
4768
4769.. COMMENT: === CONFIGURE_MP_MAXIMUM_PROXIES ===
4770
4771.. _Configure Maximum Proxies in Multiprocessor Configuration:
4772
4773Configure Maximum Proxies in Multiprocessor Configuration
4774---------------------------------------------------------
4775.. index:: CONFIGURE_MP_MAXIMUM_PROXIES
4776
4777CONSTANT:
4778    ``CONFIGURE_MP_MAXIMUM_PROXIES``
4779
4780DATA TYPE:
4781    Unsigned integer (``uint32_t``).
4782
4783RANGE:
4784    Undefined or positive.
4785
4786DEFAULT VALUE:
4787    The default value is 32.
4788
4789DESCRIPTION:
4790    ``CONFIGURE_MP_MAXIMUM_PROXIES`` is the maximum number of concurrently
4791    active thread/task proxies on this node in a multiprocessor system.
4792
4793NOTES:
4794    Since a proxy is used to represent a remote task/thread which is blocking
4795    on this node. This configuration parameter reflects the maximum number of
4796    remote tasks/threads which can be blocked on objects on this node.
4797
4798.. COMMENT: XXX - add xref to proxy discussion in MP chapter
4799
4800.. COMMENT: === CONFIGURE_MP_MPCI_TABLE_POINTER ===
4801
4802.. _Configure MPCI in Multiprocessor Configuration:
4803
4804Configure MPCI in Multiprocessor Configuration
4805----------------------------------------------
4806.. index:: CONFIGURE_MP_MPCI_TABLE_POINTER
4807
4808CONSTANT:
4809    ``CONFIGURE_MP_MPCI_TABLE_POINTER``
4810
4811DATA TYPE:
4812    pointer to ``rtems_mpci_table``
4813
4814RANGE:
4815    undefined or valid pointer
4816
4817DEFAULT VALUE:
4818    This is not defined by default.
4819
4820DESCRIPTION:
4821    ``CONFIGURE_MP_MPCI_TABLE_POINTER`` is the pointer to the MPCI
4822    Configuration Table.  The default value of this field is``&MPCI_table``.
4823
4824NOTES:
4825    RTEMS provides a Shared Memory MPCI Device Driver which can be used on any
4826    Multiprocessor System assuming the BSP provides the proper set of
4827    supporting methods.
4828
4829.. COMMENT: === CONFIGURE_HAS_OWN_MULTIPROCESSING_TABLE ===
4830
4831.. _Do Not Generate Multiprocessor Configuration Table:
4832
4833Do Not Generate Multiprocessor Configuration Table
4834--------------------------------------------------
4835.. index:: CONFIGURE_HAS_OWN_MULTIPROCESSING_TABLE
4836
4837CONSTANT:
4838    ``CONFIGURE_HAS_OWN_MULTIPROCESSING_TABLE``
4839
4840DATA TYPE:
4841    Boolean feature macro.
4842
4843RANGE:
4844    Defined or undefined.
4845
4846DEFAULT VALUE:
4847    This is not defined by default.
4848
4849DESCRIPTION:
4850    ``CONFIGURE_HAS_OWN_MULTIPROCESSING_TABLE`` is defined if the application
4851    wishes to provide their own Multiprocessing Configuration Table.  The
4852    generated table is named ``Multiprocessing_configuration``.
4853
4854NOTES:
4855    This is a configuration parameter which is very unlikely to be used by an
4856    application. If you find yourself wanting to use it in an application,
4857    please reconsider and discuss this on the RTEMS Users mailing list.
4858
4859.. COMMENT: === Ada Tasks ===
4860
4861Ada Tasks
4862=========
4863
4864This section defines the system configuration parameters supported by
4865``<rtems/confdefs.h>`` related to configuring RTEMS to support a task using Ada
4866tasking with GNAT/RTEMS.
4867
4868These configuration parameters are only available when RTEMS is built with the
4869``--enable-ada`` configure option and the application specifies
4870``CONFIGURE_GNAT_RTEMS``.
4871
4872Additionally RTEMS includes an Ada language binding to the Classic API which
4873has a test suite. This test suite is enabled only when``--enable-tests`` and
4874``--enable-expada`` are specified on the configure command.
4875
4876.. COMMENT: === CONFIGURE_GNAT_RTEMS ===
4877
4878.. _Specify Application Includes Ada Code:
4879
4880Specify Application Includes Ada Code
4881-------------------------------------
4882.. index:: CONFIGURE_GNAT_RTEMS
4883
4884CONSTANT:
4885    ``CONFIGURE_GNAT_RTEMS``
4886
4887DATA TYPE:
4888    Boolean feature macro.
4889
4890RANGE:
4891    Defined or undefined.
4892
4893DEFAULT VALUE:
4894    This is not defined by default.
4895
4896DESCRIPTION:
4897    ``CONFIGURE_GNAT_RTEMS`` is defined to inform RTEMS that the GNAT Ada
4898    run-time is to be used by the application.
4899
4900NOTES:
4901    This configuration parameter is critical as it makes``<rtems/confdefs.h>``
4902    configure the resources (POSIX API Threads, Mutexes, Condition Variables,
4903    and Keys) used implicitly by the GNAT run-time.
4904
4905.. COMMENT: === CONFIGURE_MAXIMUM_ADA_TASKS ===
4906
4907.. _Specify the Maximum Number of Ada Tasks.:
4908
4909Specify the Maximum Number of Ada Tasks.
4910----------------------------------------
4911.. index:: CONFIGURE_MAXIMUM_ADA_TASKS
4912
4913CONSTANT:
4914    ``CONFIGURE_MAXIMUM_ADA_TASKS``
4915
4916DATA TYPE:
4917    Unsigned integer (``uint32_t``).
4918
4919RANGE:
4920    Undefined or positive.
4921
4922DEFAULT VALUE:
4923    If ``CONFIGURE_GNAT_RTEMS`` is defined, then the default value is 20,
4924    otherwise the default value is 0.
4925
4926DESCRIPTION:
4927    ``CONFIGURE_MAXIMUM_ADA_TASKS`` is the number of Ada tasks that can be
4928    concurrently active in the system.
4929
4930NOTES:
4931    None.
4932
4933.. COMMENT: === CONFIGURE_MAXIMUM_FAKE_ADA_TASKS ===
4934
4935.. _Specify the Maximum Fake Ada Tasks:
4936
4937Specify the Maximum Fake Ada Tasks
4938----------------------------------
4939.. index:: CONFIGURE_MAXIMUM_FAKE_ADA_TASKS
4940
4941CONSTANT:
4942    .. index:: ``CONFIGURE_MAXIMUM_FAKE_ADA_TASKS``
4943
4944DATA TYPE:
4945    Unsigned integer (``uint32_t``).
4946
4947RANGE:
4948    Zero or positive.
4949
4950DEFAULT VALUE:
4951    The default value is 0.
4952
4953DESCRIPTION:
4954    ``CONFIGURE_MAXIMUM_FAKE_ADA_TASKS`` is the number of *fake* Ada tasks that
4955    can be concurrently active in the system.  A *fake* Ada task is a non-Ada
4956    task that makes calls back into Ada code and thus implicitly uses the Ada
4957    run-time.
4958
4959NOTES:
4960    None.
4961
4962.. COMMENT: === PCI Library ===
4963
4964PCI Library
4965===========
4966
4967This section defines the system configuration parameters supported by
4968``rtems/confdefs.h`` related to configuring the PCI Library for RTEMS.
4969
4970The PCI Library startup behaviour can be configured in four different ways
4971depending on how ``CONFIGURE_PCI_CONFIG_LIB`` is defined:
4972
4973.. index:: PCI_LIB_AUTO
4974
4975``PCI_LIB_AUTO``
4976  Used to enable the PCI auto configuration software. PCI will be automatically
4977  probed, PCI buses enumerated, all devices and bridges will be initialized
4978  using Plug & Play software routines. The PCI device tree will be populated
4979  based on the PCI devices found in the system, PCI devices will be configured
4980  by allocating address region resources automatically in PCI space according
4981  to the BSP or host bridge driver set up.
4982
4983.. index:: PCI_LIB_READ
4984
4985``PCI_LIB_READ``
4986  Used to enable the PCI read configuration software. The current PCI
4987  configuration is read to create the RAM representation (the PCI device tree)
4988  of the PCI devices present. PCI devices are assumed to already have been
4989  initialized and PCI buses enumerated, it is therefore required that a BIOS or
4990  a boot loader has set up configuration space prior to booting into RTEMS.
4991
4992.. index:: PCI_LIB_STATIC
4993
4994``PCI_LIB_STATIC``
4995  Used to enable the PCI static configuration software. The user provides a PCI
4996  tree with information how all PCI devices are to be configured at compile
4997  time by linking in a custom ``struct pci_bus pci_hb`` tree. The static PCI
4998  library will not probe PCI for devices, instead it will assume that all
4999  devices defined by the user are present, it will enumerate the PCI buses and
5000  configure all PCI devices in static configuration accordingly. Since probe
5001  and allocation software is not needed the startup is faster, has smaller
5002  footprint and does not require dynamic memory allocation.
5003
5004.. index:: PCI_LIB_PERIPHERAL
5005
5006``PCI_LIB_PERIPHERAL``
5007  Used to enable the PCI peripheral configuration. It is similar to
5008  ``PCI_LIB_STATIC``, but it will never write the configuration to the PCI
5009  devices since PCI peripherals are not allowed to access PCI configuration
5010  space.
5011
5012Note that selecting ``PCI_LIB_STATIC`` or ``PCI_LIB_PERIPHERAL`` but not
5013defining ``pci_hb`` will reuslt in link errors. Note also that in these modes
5014Plug & Play is not performed.
5015
5016.. COMMENT: === Go Tasks ===
5017
5018Go Tasks
5019========
5020
5021.. COMMENT: === CONFIGURE_ENABLE_GO ===
5022
5023.. _Specify Application Includes Go Code:
5024
5025Specify Application Includes Go Code
5026------------------------------------
5027.. index:: CONFIGURE_ENABLE_GO
5028
5029CONSTANT:
5030    ``CONFIGURE_ENABLE_GO``
5031
5032DATA TYPE:
5033    Boolean feature macro.
5034
5035RANGE:
5036    Defined or undefined.
5037
5038DEFAULT VALUE:
5039    This is not defined by default.
5040
5041DESCRIPTION:
5042    ``CONFIGURE_ENABLE_GO`` is defined to inform RTEMS that the Go run-time is
5043    to be used by the application.
5044
5045NOTES:
5046    The Go language support is experimental
5047
5048.. COMMENT: === CONFIGURE_MAXIMUM_GOROUTINES ===
5049
5050.. _Specify the maximum number of Go routines:
5051
5052Specify the maximum number of Go routines
5053-----------------------------------------
5054.. index:: CONFIGURE_MAXIMUM_GOROUTINES
5055
5056CONSTANT:
5057    ``CONFIGURE_MAXIMUM_GOROUTINES``
5058
5059DATA TYPE:
5060    Unsigned integer (``uint32_t``).
5061
5062RANGE:
5063    Zero or positive.
5064
5065DEFAULT VALUE:
5066    The default value is 400
5067
5068DESCRIPTION:
5069    ``CONFIGURE_MAXIMUM_GOROUTINES`` is defined to specify the maximum number
5070    of Go routines.
5071
5072NOTES:
5073    The Go language support is experimental
5074
5075.. COMMENT: === CONFIGURE_MAXIMUM_GO_CHANNELS ===
5076
5077.. _Specify the maximum number of Go Channels:
5078
5079Specify the maximum number of Go Channels
5080-----------------------------------------
5081.. index:: CONFIGURE_MAXIMUM_GO_CHANNELS
5082
5083CONSTANT:
5084    ``CONFIGURE_MAXIMUM_GO_CHANNELS``
5085
5086DATA TYPE:
5087    Unsigned integer (``uint32_t``).
5088
5089RANGE:
5090    Zero or positive.
5091
5092DEFAULT VALUE:
5093    The default value is 500
5094
5095DESCRIPTION:
5096    ``CONFIGURE_MAXIMUM_GO_CHANNELS`` is defined to specify the maximum number
5097    of Go channels.
5098
5099NOTES:
5100    The Go language support is experimental
5101
5102.. COMMENT: === Configuration Data Structures ===
5103
5104Configuration Data Structures
5105=============================
5106
5107It is recommended that applications be configured using ``<rtems/confdefs.h>``
5108as it is simpler and insulates applications from changes in the underlying data
5109structures.  However, it is sometimes important to understand the data
5110structures that are automatically filled in by the configuration parameters.
5111This section describes the primary configuration data structures.
5112
5113If the user wishes to see the details of a particular data structure, they are
5114are advised to look at the source code. After all, that is one of the
5115advantages of RTEMS.
Note: See TracBrowser for help on using the repository browser.