source: rtems-docs/c_user/configuring_a_system.rst @ 170418a

4.115
Last change on this file since 170418a was bcd64c6, checked in by Chris Johns <chrisj@…>, on 02/18/16 at 05:22:28

Minor fixes.

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