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

5
Last change on this file since e23f46c was e23f46c, checked in by Sebastian Huber <sebastian.huber@…>, on 01/30/17 at 10:31:45

c-user: Update key concepts time

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