source: rtems/doc/user/conf.t @ 145becf

4.115
Last change on this file since 145becf was e239760, checked in by Sebastian Huber <sebastian.huber@…>, on 04/29/14 at 14:09:35

score: SMP_FATAL_SCHEDULER_WITHOUT_PROCESSORS

Avoid the SMP_FATAL_SCHEDULER_WITHOUT_PROCESSORS fatal error and make it
a run-time error in rtems_scheduler_ident() and _Scheduler_Get_by_id().

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