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

5
Last change on this file since 7b0db6a was 7b0db6a, checked in by Sebastian Huber <sebastian.huber@…>, on 12/19/16 at 13:51:08

CONFIGURE_MAXIMUM_POSIX_MESSAGE_QUEUE_DESCRIPTORS

Do not mention obsolete
CONFIGURE_MAXIMUM_POSIX_MESSAGE_QUEUE_DESCRIPTORS.

Close #2702.

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