source: rtems/cpukit/sapi/include/confdefs.h @ 00bf6744

4.10
Last change on this file since 00bf6744 was 00bf6744, checked in by Sebastian Huber <sebastian.huber@…>, on Jul 1, 2010 at 2:10:54 PM

2010-06-07 Sebastian Huber <sebastian.huber@…>

  • libcsupport/include/rtems/libio_.h: Declare rtems_filesystem_mount_table_control.
  • libcsupport/include/rtems/libio.h: Removed rtems_filesystem_table_first(), rtems_filesystem_table_next() and rtems_filesystem_table_node_t declarations. Declare rtems_per_filesystem_routine, rtems_filesystem_iterate() and rtems_filesystem_get_mount_handler().
  • libcsupport/src/mount.c: Added rtems_filesystem_mounts_first() and rtems_filesystem_mounts_next(). Simplify mount(). Removed rtems_filesystem_mount_table_control_init. Use rtems_filesystem_get_mount_handler().
  • libcsupport/src/mount-mgr.c: Removed rtems_filesystem_mounts_first() and rtems_filesystem_mounts_next(). Added rtems_filesystem_iterate() and rtems_filesystem_get_mount_handler(). Use rtems_libio_lock() and rtems_libio_unlock();
  • sapi/include/confdefs.h, libmisc/shell/main_mount.c: Update for mount API changes.

2010-06-07 Bharath Suri <bharath.s.jois@…>

  • libcsupport/include/rtems/libio_.h: Removed macros rtems_filesystem_is_separator rtems_filesystem_get_start_loc rtems_filesystem_get_sym_start_loc and added them as files under libcsupport/src/
  • libcsupport/src/: Added new files libcsupport/src/sup_fs_get_start_loc.c libcsupport/src/sup_fs_get_sym_start_loc.c libcsupport/src/sup_fs_is_separator.c
  • libcsupport/Makefile.am: Changes to accommodate new files under libcsupport/src/
  • Property mode set to 100644
File size: 78.4 KB
Line 
1/**
2 * @file rtems/confdefs.h
3 *
4 *  This include file contains the configuration table template that will
5 *  be instantiated by an application based on the setting of a number
6 *  of macros.  The macros are documented in the Configuring a System
7 *  chapter of the Classic API User's Guide
8 *
9 *  The model is to estimate the memory required for each configured item
10 *  and sum those estimates.  The estimate can be too high or too low for
11 *  a variety of reasons:
12 *
13 *  Reasons estimate is too high:
14 *    + FP contexts (not all tasks are FP)
15 *
16 *  Reasons estimate is too low:
17 *    + stacks greater than minimum size
18 *    + messages
19 *    + application must account for device driver resources
20 *    + application must account for add-on library resource requirements
21 *
22 *  NOTE:  Eventually this may be able to take into account some of
23 *         the above.  This procedure has evolved from just enough to
24 *         support the RTEMS Test Suites into something that can be
25 *         used remarkably reliably by most applications.
26 */
27
28/*
29 *  COPYRIGHT (c) 1989-2010.
30 *  On-Line Applications Research Corporation (OAR).
31 *
32 *  The license and distribution terms for this file may be
33 *  found in the file LICENSE in this distribution or at
34 *  http://www.rtems.com/license/LICENSE.
35 *
36 *  $Id$
37 */
38
39#ifndef __CONFIGURATION_TEMPLATE_h
40#define __CONFIGURATION_TEMPLATE_h
41
42/*
43 * Include the executive's configuration
44 */
45#include <rtems/score/cpuopts.h>
46#include <rtems/score/apimutex.h>
47
48#ifdef __cplusplus
49extern "C" {
50#endif
51
52extern rtems_initialization_tasks_table Initialization_tasks[];
53extern rtems_driver_address_table       Device_drivers[];
54extern rtems_configuration_table        Configuration;
55#if defined(RTEMS_MULTIPROCESSING)
56  extern rtems_multiprocessing_table      Multiprocessing_configuration;
57#endif
58#ifdef RTEMS_POSIX_API
59  extern posix_api_configuration_table    Configuration_POSIX_API;
60#endif
61#ifdef RTEMS_ITRON_API
62  extern itron_api_configuration_table    Configuration_ITRON_API;
63#endif
64
65/**
66 *  This macro determines whether the RTEMS reentrancy support for
67 *  the Newlib C Library is enabled.
68 */
69#if (defined(RTEMS_NEWLIB) && !defined(CONFIGURE_DISABLE_NEWLIB_REENTRANCY))
70  #define CONFIGURE_NEWLIB_EXTENSION 1
71#else
72  #define CONFIGURE_NEWLIB_EXTENSION 0
73#endif
74
75#include <rtems/libio.h>
76
77#ifdef CONFIGURE_INIT
78rtems_libio_init_functions_t rtems_libio_init_helper =
79    #ifdef CONFIGURE_APPLICATION_DISABLE_FILESYSTEM
80    NULL;
81    #else
82    rtems_libio_init;
83    #endif
84
85rtems_libio_supp_functions_t rtems_libio_supp_helper =
86    #ifdef CONFIGURE_APPLICATION_DISABLE_FILESYSTEM
87    NULL;
88    #else
89    open_dev_console;
90    #endif
91
92rtems_fs_init_functions_t    rtems_fs_init_helper =
93    #ifdef CONFIGURE_APPLICATION_DISABLE_FILESYSTEM
94    NULL;
95    #else
96    rtems_filesystem_initialize;
97    #endif
98#endif
99
100
101/*
102 *  If the application disables the filesystem, they will not need
103 *  a mount table, so do not produce one.
104 */
105#ifdef CONFIGURE_APPLICATION_DISABLE_FILESYSTEM
106  #define CONFIGURE_HAS_OWN_MOUNT_TABLE
107#endif
108
109/**
110 *  This macro defines the number of POSIX file descriptors allocated
111 *  and managed by libio.  These are the "integer" file descriptors that
112 *  are used by calls like open(2) and read(2).
113 */
114#ifndef CONFIGURE_LIBIO_MAXIMUM_FILE_DESCRIPTORS
115  #define CONFIGURE_LIBIO_MAXIMUM_FILE_DESCRIPTORS 3
116#endif
117
118/**
119 *  From the number of file descriptors, we can determine how many
120 *  semaphores the implementation will require.
121 */
122#define CONFIGURE_LIBIO_SEMAPHORES \
123  (CONFIGURE_LIBIO_MAXIMUM_FILE_DESCRIPTORS + 1)
124
125#ifdef CONFIGURE_INIT
126  /**
127   *  When instantiating the configuration tables, this variable is
128   *  initialized to specify the maximum number of file descriptors.
129   */
130  uint32_t rtems_libio_number_iops = CONFIGURE_LIBIO_MAXIMUM_FILE_DESCRIPTORS;
131#endif
132
133/**
134 *  This macro determines if termios is disabled by this application.
135 *  This only means that resources will not be reserved.  If you end
136 *  up using termios, it will fail.
137 */
138#ifdef CONFIGURE_TERMIOS_DISABLED
139  #define CONFIGURE_TERMIOS_SEMAPHORES 0
140#else
141  /**
142   *  This macro specifies the number of serial or PTY ports that will
143   *  use termios.
144   */
145  #ifndef CONFIGURE_NUMBER_OF_TERMIOS_PORTS
146  #define CONFIGURE_NUMBER_OF_TERMIOS_PORTS 1
147  #endif
148
149  /**
150   *  This macro reserves the number of semaphores required by termios
151   *  based upon the number of communication ports that will use it.
152   */
153  #define CONFIGURE_TERMIOS_SEMAPHORES \
154    ((CONFIGURE_NUMBER_OF_TERMIOS_PORTS * 4) + 1)
155#endif
156
157/**
158 *  This macro specifies the number of PTYs that can be concurrently
159 *  active.
160 */
161#ifndef CONFIGURE_MAXIMUM_PTYS
162  #define CONFIGURE_MAXIMUM_PTYS 0
163#endif
164
165/**
166 *  This variable contains the maximum number of PTYs that can be
167 *  concurrently active.
168 */
169#ifdef CONFIGURE_INIT
170  int rtems_telnetd_maximum_ptys = CONFIGURE_MAXIMUM_PTYS;
171#else
172  extern int rtems_telnetd_maximum_ptys;
173#endif
174
175/*
176 *  Filesystems and Mount Table Configuration.
177 *
178 *  Defines to control the file system:
179 *
180 *   CONFIGURE_APPLICATION_DISABLE_FILESYSTEM:
181 *     Disable the RTEMS filesystems. You get an empty DEVFS.
182 *
183 *   CONFIGURE_USE_DEVFS_AS_BASE_FILESYSTEM:
184 *     Use the DEVFS as the root file system. Limited functions are
185 *     provided when this is used.
186 *
187 *   CONFIGURE_FILESYSTEM_ALL:
188 *     Add file filesystems to the default filesystem table.
189 *
190 *   List of available file systems. You can define as many as you like:
191 *     CONFIGURE_FILESYSTEM_miniIMFS - MiniIMFS, use DEVFS now
192 *     CONFIGURE_FILESYSTEM_IMFS     - In Memory File System (IMFS)
193 *     CONFIGURE_FILESYSTEM_DEVFS    - Device File System (DSVFS)
194 *     CONFIGURE_FILESYSTEM_TFTPFS   - TFTP File System, networking enabled
195 *     CONFIGURE_FILESYSTEM_FTPFS    - FTP File System, networking enabled
196 *     CONFIGURE_FILESYSTEM_NFSFS    - Network File System, networking enabled
197 *     CONFIGURE_FILESYSTEM_DOSFS    - DOS File System, uses libblock
198 *     CONFIGURE_FILESYSTEM_RFS      - RTEMS File System (RFS), uses libblock
199 *
200 *   Combinations:
201 *
202 *    - If nothing is defined the base file system is the IMFS.
203 *
204 *    - If CONFIGURE_APPLICATION_DISABLE_FILESYSTEM is defined all filesystem
205 *      are disabled by force and an empty DEVFS is created.
206 *
207 *    - If CONFIGURE_USE_DEV_AS_BASE_FILESYSTEM is defined all filesystem
208 *      are disabled by force and DEVFS is defined.
209 */
210
211#ifdef CONFIGURE_INIT
212
213  /*
214   * Include all file systems. Do this before checking if the filesystem has
215   * been disabled.
216   */
217  #ifdef CONFIGURE_FILESYSTEM_ALL
218    #define CONFIGURE_FILESYSTEM_miniIMFS
219    #define CONFIGURE_FILESYSTEM_IMFS
220    #define CONFIGURE_FILESYSTEM_DEVFS
221    #define CONFIGURE_FILESYSTEM_TFTPFS
222    #define CONFIGURE_FILESYSTEM_FTPFS
223    #define CONFIGURE_FILESYSTEM_NFSFS
224    #define CONFIGURE_FILESYSTEM_DOSFS
225    #define CONFIGURE_FILESYSTEM_RFS
226  #endif
227
228  /*
229   * If disabling the file system undef everything. If DEVFS as the base
230   * filesystem undefine all other filesystems because you cannot mount other
231   * filesystems. Same for miniIMFS.
232   */
233  #if defined(CONFIGURE_APPLICATION_DISABLE_FILESYSTEM) || \
234      defined(CONFIGURE_USE_DEVFS_AS_BASE_FILESYSTEM) || \
235      defined(CONFIGURE_USE_MINIIMFS_AS_BASE_FILESYSTEM)
236    #if defined(CONFIGURE_APPLICATION_DISABLE_FILESYSTEM)
237      #undef CONFIGURE_USE_DEVFS_AS_BASE_FILESYSTEM
238      #undef CONFIGURE_USE_MINIIMFS_AS_BASE_FILESYSTEM
239    #elif defined(CONFIGURE_USE_DEVFS_AS_BASE_FILESYSTEM)
240      #undef CONFIGURE_USE_MINIIMFS_AS_BASE_FILESYSTEM
241    #endif
242    #undef CONFIGURE_FILESYSTEM_miniIMFS
243    #undef CONFIGURE_FILESYSTEM_IMFS
244    #undef CONFIGURE_FILESYSTEM_DEVFS
245    #undef CONFIGURE_FILESYSTEM_TFTPFS
246    #undef CONFIGURE_FILESYSTEM_FTPFS
247    #undef CONFIGURE_FILESYSTEM_NFSFS
248    #undef CONFIGURE_FILESYSTEM_DOSFS
249    #undef CONFIGURE_FILESYSTEM_RFS
250  #endif
251
252  /*
253   * If the base filesystem is DEVFS define it else define IMFS.
254   * We will have either DEVFS or IMFS defined after this.
255   */
256  #if defined(CONFIGURE_USE_DEVFS_AS_BASE_FILESYSTEM)
257    #define CONFIGURE_FILESYSTEM_DEVFS
258  #elif defined(CONFIGURE_USE_MINIIMFS_AS_BASE_FILESYSTEM)
259    #define CONFIGURE_FILESYSTEM_miniIMFS
260  #elif !defined(CONFIGURE_FILESYSTEM_IMFS)
261    #define CONFIGURE_FILESYSTEM_IMFS
262  #endif
263
264#endif
265
266/**
267 * IMFS
268 */
269#include <rtems/imfs.h>
270
271/**
272 *  This specifies the number of bytes per block for files within the IMFS.
273 *  There are a maximum number of blocks per file so this dictates the maximum
274 *  size of a file.  This has to be balanced with the unused portion of each
275 *  block that might be wasted.
276 */
277#ifndef CONFIGURE_IMFS_MEMFILE_BYTES_PER_BLOCK
278  #define CONFIGURE_IMFS_MEMFILE_BYTES_PER_BLOCK \
279                    IMFS_MEMFILE_DEFAULT_BYTES_PER_BLOCK
280#endif
281
282/**
283 *  This defines the miniIMFS file system table entry.
284 */ 
285#if !defined(CONFIGURE_FILESYSTEM_ENTRY_miniIMFS) && \
286    defined(CONFIGURE_FILESYSTEM_miniIMFS)
287#define CONFIGURE_FILESYSTEM_ENTRY_miniIMFS { "mimfs", miniIMFS_initialize }
288#endif
289
290/**
291 *  This defines the IMFS file system table entry.
292 */ 
293#if !defined(CONFIGURE_FILESYSTEM_ENTRY_IMFS) && \
294    defined(CONFIGURE_FILESYSTEM_IMFS)
295#define CONFIGURE_FILESYSTEM_ENTRY_IMFS { "imfs", IMFS_initialize }
296#endif
297
298/**
299 * DEVFS
300 */ 
301#if !defined(CONFIGURE_FILESYSTEM_ENTRY_DEVFS) && \
302    defined(CONFIGURE_FILESYSTEM_DEVFS)
303#include <rtems/devfs.h>
304#define CONFIGURE_FILESYSTEM_ENTRY_DEVFS { "devfs", devFS_initialize }
305#endif
306
307#ifdef RTEMS_NETWORKING
308  /**
309   * FTPFS
310   */ 
311  #if !defined(CONFIGURE_FILESYSTEM_ENTRY_FTPFS) && \
312      defined(CONFIGURE_FILESYSTEM_FTPFS) 
313    #include <rtems/ftpfs.h>
314    #define CONFIGURE_FILESYSTEM_ENTRY_FTPFS { "ftpfs", rtems_ftpfs_initialize }
315  #endif
316
317  /**
318   * TFTPFS
319   */ 
320  #if !defined(CONFIGURE_FILESYSTEM_ENTRY_TFTPFS) && \
321      defined(CONFIGURE_FILESYSTEM_TFTPFS)
322    #include <rtems/tftp.h>
323    #define CONFIGURE_FILESYSTEM_ENTRY_TFTPFS { "tftpfs", rtems_tftpfs_initialize }
324  #endif
325
326  /**
327   * NFSFS
328   */ 
329  #if !defined(CONFIGURE_FILESYSTEM_ENTRY_NFSFS) && \
330      defined(CONFIGURE_FILESYSTEM_NFSFS)
331    #include <librtemsNfs.h>
332    #define CONFIGURE_FILESYSTEM_ENTRY_NFSFS { "nfs", rtems_nfsfs_initialize }
333  #endif
334#endif
335
336/**
337 * DOSFS
338 */ 
339#if !defined(CONFIGURE_FILESYSTEM_ENTRY_DOSFS) && \
340    defined(CONFIGURE_FILESYSTEM_DOSFS)
341  #include <rtems/dosfs.h>
342  #define CONFIGURE_FILESYSTEM_ENTRY_DOSFS { "dosfs", rtems_dosfs_initialize }
343#endif
344
345/**
346 * RFS
347 */ 
348#if !defined(CONFIGURE_FILESYSTEM_ENTRY_RFS) && \
349    defined(CONFIGURE_FILESYSTEM_RFS)
350  #include <rtems/rtems-rfs.h>
351  #define CONFIGURE_FILESYSTEM_ENTRY_RFS { "rfs", rtems_rfs_rtems_initialise }
352#endif
353
354#ifdef CONFIGURE_INIT
355
356  /*
357   *  DEVFS variables.
358   */
359  #if defined(CONFIGURE_APPLICATION_DISABLE_FILESYSTEM)
360    #define CONFIGURE_MEMORY_FOR_DEVFS  0
361  #elif defined(CONFIGURE_FILESYSTEM_DEVFS)
362    #ifndef CONFIGURE_MAXIMUM_DEVICES
363      #define CONFIGURE_MAXIMUM_DEVICES 4
364    #endif
365    #include <rtems/devfs.h>
366    uint32_t rtems_device_table_size = CONFIGURE_MAXIMUM_DEVICES;
367    #define CONFIGURE_MEMORY_FOR_DEVFS \
368      _Configure_Object_RAM(CONFIGURE_MAXIMUM_DEVICES, \
369         sizeof (rtems_device_name_t))
370  #else
371    #define CONFIGURE_MEMORY_FOR_DEVFS  0
372  #endif
373
374  #if defined(CONFIGURE_FILESYSTEM_IMFS) || \
375      defined(CONFIGURE_FILESYSTEM_miniIMFS)
376    int imfs_rq_memfile_bytes_per_block = CONFIGURE_IMFS_MEMFILE_BYTES_PER_BLOCK;
377  #endif
378
379  /**
380   * Table termination record.
381   */
382  #define CONFIGURE_FILESYSTEM_NULL { NULL, NULL }
383
384  /**
385   * The default file system table. Must be terminated with the NULL entry if
386   * you provide your own.
387   */
388  #ifndef CONFIGURE_HAS_OWN_FILESYSTEM_TABLE
389    const rtems_filesystem_table_t rtems_filesystem_table[] = {
390      #if defined(CONFIGURE_FILESYSTEM_miniIMFS) && \
391          defined(CONFIGURE_FILESYSTEM_ENTRY_miniIMFS)
392        CONFIGURE_FILESYSTEM_ENTRY_miniIMFS,
393      #endif
394      #if defined(CONFIGURE_FILESYSTEM_IMFS) && \
395          defined(CONFIGURE_FILESYSTEM_ENTRY_IMFS)
396        CONFIGURE_FILESYSTEM_ENTRY_IMFS,
397      #endif
398      #if defined(CONFIGURE_FILESYSTEM_DEVFS) && \
399          defined(CONFIGURE_FILESYSTEM_ENTRY_DEVFS)
400        CONFIGURE_FILESYSTEM_ENTRY_DEVFS,
401      #endif
402      #if defined(CONFIGURE_FILESYSTEM_TFTPFS) && \
403          defined(CONFIGURE_FILESYSTEM_ENTRY_TFTPFS)
404        CONFIGURE_FILESYSTEM_ENTRY_TFTPFS,
405      #endif
406      #if defined(CONFIGURE_FILESYSTEM_FTPFS) && \
407          defined(CONFIGURE_FILESYSTEM_ENTRY_FTPFS)
408        CONFIGURE_FILESYSTEM_ENTRY_FTPFS,
409      #endif
410      #if defined(CONFIGURE_FILESYSTEM_NFSFS) && \
411          defined(CONFIGURE_FILESYSTEM_ENTRY_NFSFS)
412        CONFIGURE_FILESYSTEM_ENTRY_NFSFS,
413      #endif
414      #if defined(CONFIGURE_FILESYSTEM_DOSFS) && \
415          defined(CONFIGURE_FILESYSTEM_ENTRY_DOSFS)
416        CONFIGURE_FILESYSTEM_ENTRY_DOSFS,
417      #endif
418      #if defined(CONFIGURE_FILESYSTEM_RFS) && \
419          defined(CONFIGURE_FILESYSTEM_ENTRY_RFS)
420        CONFIGURE_FILESYSTEM_ENTRY_RFS,
421      #endif
422      CONFIGURE_FILESYSTEM_NULL
423    };
424  #endif
425
426  /**
427   *  This disables the inclusion of pipe support in the full IMFS.
428   *
429   *  NOTE: When building for coverage, we need this variable all the time.
430   */
431  #if !defined(CONFIGURE_USE_DEVFS_AS_BASE_FILESYSTEM) || \
432      defined(RTEMS_COVERAGE)
433    #if defined(CONFIGURE_PIPES_ENABLED)
434      bool rtems_pipe_configured = true;
435    #else
436      bool rtems_pipe_configured = false;
437    #endif
438  #endif
439
440  #ifndef CONFIGURE_HAS_OWN_MOUNT_TABLE
441    const rtems_filesystem_mount_table_t configuration_mount_table = {
442      #if defined(CONFIGURE_USE_DEVFS_AS_BASE_FILESYSTEM)
443        "devfs",
444      #elif defined(CONFIGURE_USE_MINIIMFS_AS_BASE_FILESYSTEM)
445        "mimfs",
446      #else  /* using IMFS as base filesystem */
447        "imfs",
448      #endif
449      RTEMS_FILESYSTEM_READ_WRITE,
450      NULL,
451      NULL
452    };
453
454    const rtems_filesystem_mount_table_t
455        *rtems_filesystem_mount_table = &configuration_mount_table;
456    const int rtems_filesystem_mount_table_size = 1;
457  #endif
458
459#endif
460
461/*
462 *  STACK_CHECER_ON was still available in 4.9 so give a warning for now.
463 */
464#if defined(STACK_CHECKER_ON)
465  #define CONFIGURE_STACK_CHECKER_ENABLED
466  #warning "STACK_CHECKER_ON deprecated -- use CONFIGURE_STACK_CHECKER_ENABLED"
467#endif
468
469/**
470 *  This configures the stack checker user extension.
471 */
472#ifdef CONFIGURE_STACK_CHECKER_ENABLED
473  #define CONFIGURE_STACK_CHECKER_EXTENSION 1
474#else
475  #define CONFIGURE_STACK_CHECKER_EXTENSION 0
476#endif
477
478/**
479 *  @brief Maximum Priority configuration
480 *
481 *  This configures the maximum priority value that
482 *  a task may have.
483 *
484 *  By reducing the number of priorities in a system,
485 *  the amount of RAM required by RTEMS can be significantly
486 *  reduced.  RTEMS allocates a Chain_Control structure per
487 *  priority and this structure contains 3 pointers.  So
488 *  the default is (256 * 12) = 3K on 32-bit architectures.
489 *
490 *  This must be one less than a power of 2 between
491 *  4 and 256.  Valid values along with the application
492 *  priority levels and memory saved when pointers are
493 *  32-bits in size are:
494 *
495 *    + 3,  2 application priorities, 3024 bytes saved
496 *    + 7, 5 application priorities, 2976 bytes saved
497 *    + 15, 13 application priorities, 2880 bytes saved
498 *    + 31, 29 application priorities, 2688 bytes saved
499 *    + 63, 61 application priorities, 2304 bytes saved
500 *    + 127, 125 application priorities, 1536 bytes saved
501 *    + 255, 253 application priorities, 0 bytes saved
502 *
503 *  It is specified in terms of Classic API
504 *  priority values.
505 */
506#ifndef CONFIGURE_MAXIMUM_PRIORITY
507  #define CONFIGURE_MAXIMUM_PRIORITY PRIORITY_DEFAULT_MAXIMUM
508#endif
509
510/*
511 *  If you said the IDLE task was going to do application initialization
512 *  and didn't override the IDLE body, then something is amiss.
513 */
514#if (defined(CONFIGURE_IDLE_TASK_INITIALIZES_APPLICATION) && \
515     !defined(CONFIGURE_IDLE_TASK_BODY))
516  #error "CONFIGURE_ERROR: You did not override the IDLE task body."
517#endif
518
519/**
520 *  @brief Idle task body configuration
521 *
522 *  There is a default IDLE thread body provided by RTEMS which
523 *  has the possibility of being CPU specific.  There may be a
524 *  BSP specific override of the RTEMS default body and in turn,
525 *  the application may override and provide its own.
526 */
527#ifndef CONFIGURE_IDLE_TASK_BODY
528  #if defined(BSP_IDLE_TASK_BODY)
529    #define CONFIGURE_IDLE_TASK_BODY BSP_IDLE_TASK_BODY
530  #elif (CPU_PROVIDES_IDLE_THREAD_BODY == TRUE)
531    #define CONFIGURE_IDLE_TASK_BODY _CPU_Thread_Idle_body
532  #else
533    /* only instantiate and compile if used */
534    #ifdef CONFIGURE_INIT
535      void *_Thread_Idle_body(uintptr_t ignored)
536      {
537        for( ; ; ) ;
538        return 0;   /* to avoid warning */
539      }
540    #endif
541    #define CONFIGURE_IDLE_TASK_BODY _Thread_Idle_body
542  #endif
543#endif
544
545/**
546 *  By default, use the minimum stack size requested by this port.
547 */
548#ifndef CONFIGURE_MINIMUM_TASK_STACK_SIZE
549  #define CONFIGURE_MINIMUM_TASK_STACK_SIZE CPU_STACK_MINIMUM_SIZE
550#endif
551
552/**
553 *  @brief Idle task stack size configuration
554 *
555 *  By default, the IDLE task will have a stack of minimum size.
556 *  The BSP or application may override this value.
557 */
558#ifndef CONFIGURE_IDLE_TASK_STACK_SIZE
559  #ifdef BSP_IDLE_TASK_STACK_SIZE
560    #define CONFIGURE_IDLE_TASK_STACK_SIZE BSP_IDLE_TASK_STACK_SIZE
561  #else
562    #define CONFIGURE_IDLE_TASK_STACK_SIZE CONFIGURE_MINIMUM_TASK_STACK_SIZE
563  #endif
564#endif
565
566/**
567 *  @brief Interrupt stack size configuration
568 *
569 *  By default, the interrupt stack will be of minimum size.
570 *  The BSP or application may override this value.
571 */
572#ifndef CONFIGURE_INTERRUPT_STACK_SIZE
573  #ifdef BSP_INTERRUPT_STACK_SIZE
574    #define CONFIGURE_INTERRUPT_STACK_SIZE BSP_INTERRUPT_STACK_SIZE
575  #else
576    #define CONFIGURE_INTERRUPT_STACK_SIZE CONFIGURE_MINIMUM_TASK_STACK_SIZE
577  #endif
578#endif
579
580/**
581 *  This reserves memory for the interrupt stack if it is to be allocated
582 *  by RTEMS rather than the BSP.
583 *
584 *  @todo Try to get to the point where all BSPs support allocating the
585 *        memory from the Workspace.
586 */
587#if (CPU_ALLOCATE_INTERRUPT_STACK == 0)
588  #define CONFIGURE_INTERRUPT_STACK_MEMORY 0
589#else
590  #define CONFIGURE_INTERRUPT_STACK_MEMORY \
591     _Configure_From_workspace( CONFIGURE_INTERRUPT_STACK_SIZE )
592#endif
593
594/**
595 *  Configure the very much optional task stack allocator
596 */
597#ifndef CONFIGURE_TASK_STACK_ALLOCATOR
598  #define CONFIGURE_TASK_STACK_ALLOCATOR NULL
599#endif
600
601/**
602 *  Configure the very much optional task stack deallocator
603 */
604#ifndef CONFIGURE_TASK_STACK_DEALLOCATOR
605  #define CONFIGURE_TASK_STACK_DEALLOCATOR NULL
606#endif
607
608/**
609 *  Should the RTEMS Workspace and C Program Heap be cleared automatically
610 *  at system start up?
611 */
612#ifndef CONFIGURE_ZERO_WORKSPACE_AUTOMATICALLY
613  #ifdef BSP_ZERO_WORKSPACE_AUTOMATICALLY
614    #define CONFIGURE_ZERO_WORKSPACE_AUTOMATICALLY \
615            BSP_ZERO_WORKSPACE_AUTOMATICALLY
616  #else
617    #define CONFIGURE_ZERO_WORKSPACE_AUTOMATICALLY FALSE
618  #endif
619#endif
620
621/*
622 *  RTEMS Malloc configuration
623 */
624
625#include <rtems/malloc.h>
626
627#ifdef CONFIGURE_INIT
628  /**
629   *  By default, RTEMS uses separate heaps for the RTEMS Workspace and
630   *  the C Program Heap.  On many BSPs, these can be optionally
631   *  combined provided one larger memory pool. This is particularly
632   *  useful in combination with the unlimited objects configuration.
633   */
634  #ifdef CONFIGURE_UNIFIED_WORK_AREAS
635    #include <rtems/score/wkspace.h>
636    Heap_Control  *RTEMS_Malloc_Heap = &_Workspace_Area;
637    bool           rtems_unified_work_area = true;
638  #else
639    Heap_Control   RTEMS_Malloc_Area;
640    Heap_Control  *RTEMS_Malloc_Heap = &RTEMS_Malloc_Area;
641    bool           rtems_unified_work_area = false;
642  #endif
643#endif
644
645#ifdef CONFIGURE_INIT
646  /**
647   *  This configures the malloc family statistics to be available.
648   *  By default only function call counts are kept.
649   */
650  rtems_malloc_statistics_functions_t *rtems_malloc_statistics_helpers =
651    #ifndef CONFIGURE_MALLOC_STATISTICS
652      NULL;
653    #else
654      &rtems_malloc_statistics_helpers_table;
655    #endif
656#endif
657
658#ifdef CONFIGURE_INIT
659  /**
660   *  This configures the sbrk() support for the malloc family.
661   *  By default it is assumed that the BSP provides all available
662   *  RAM to the malloc family implementation so sbrk()'ing to get
663   *  more memory would always fail anyway.
664   */
665  rtems_malloc_sbrk_functions_t *rtems_malloc_sbrk_helpers =
666    #ifndef CONFIGURE_MALLOC_BSP_SUPPORTS_SBRK
667      NULL;
668    #else
669      &rtems_malloc_sbrk_helpers_table;
670    #endif
671#endif
672
673#ifdef CONFIGURE_INIT
674  /**
675   *  This configures the malloc family plugin which dirties memory
676   *  allocated.  This is helpful for finding unitialized data structure
677   *  problems.
678   */
679  rtems_malloc_dirtier_t rtems_malloc_dirty_helper =
680    #if defined(CONFIGURE_MALLOC_DIRTY)
681      rtems_malloc_dirty_memory;
682    #else
683      NULL;
684    #endif
685#endif
686
687/**
688 *  This is a helper macro used in calculations in this file.  It is used
689 *  to noted when an element is allocated from the RTEMS Workspace and adds
690 *  a factor to account for heap overhead plus an alignment factor that
691 *  may be applied.
692 */
693#define _Configure_From_workspace(_size) \
694  (ssize_t)((_size) + (2 * sizeof(uint32_t)) + CPU_ALIGNMENT)
695
696/**
697 *  Do not use the unlimited bit as part of the multiplication
698 *  for memory usage.
699 */
700#define _Configure_Max_Objects(_max) \
701  ((_max) & ~RTEMS_UNLIMITED_OBJECTS)
702
703/**
704 *  This macro accounts for how memory for a set of configured objects is
705 *  allocated from the Executive Workspace.
706 *
707 *  NOTE: It does NOT attempt to address the more complex case of unlimited
708 *        objects.
709 */
710#define _Configure_Object_RAM(_number, _size) \
711  ( _Configure_From_workspace(_Configure_Max_Objects(_number) * (_size)) + \
712    _Configure_From_workspace( \
713      ((_Configure_Max_Objects(_number) + 1) * sizeof(Objects_Control *)) + \
714      (sizeof(void *) + sizeof(uint32_t) + sizeof(Objects_Name *)) \
715    ) \
716  )
717
718/*
719 *  Default User Initialization Task Table.  This table guarantees that
720 *  one user initialization table is defined.
721 */
722
723#ifdef CONFIGURE_RTEMS_INIT_TASKS_TABLE
724
725#ifdef CONFIGURE_HAS_OWN_INIT_TASK_TABLE
726
727/*
728 *  The user is defining their own table information and setting the
729 *  appropriate variables.
730 */
731
732#else
733
734#ifndef CONFIGURE_INIT_TASK_NAME
735  #define CONFIGURE_INIT_TASK_NAME          rtems_build_name('U', 'I', '1', ' ')
736#endif
737
738#ifndef CONFIGURE_INIT_TASK_STACK_SIZE
739  #define CONFIGURE_INIT_TASK_STACK_SIZE    CONFIGURE_MINIMUM_TASK_STACK_SIZE
740#endif
741
742#ifndef CONFIGURE_INIT_TASK_PRIORITY
743  #define CONFIGURE_INIT_TASK_PRIORITY      1
744#endif
745
746#ifndef CONFIGURE_INIT_TASK_ATTRIBUTES
747  #define CONFIGURE_INIT_TASK_ATTRIBUTES    RTEMS_DEFAULT_ATTRIBUTES
748#endif
749
750#ifndef CONFIGURE_INIT_TASK_ENTRY_POINT
751  #ifdef __cplusplus
752  extern "C" {
753  #endif
754    rtems_task Init (rtems_task_argument );
755  #ifdef __cplusplus
756  }
757  #endif
758  #define CONFIGURE_INIT_TASK_ENTRY_POINT   Init
759  extern const char* bsp_boot_cmdline;
760  #define CONFIGURE_INIT_TASK_ARGUMENTS     ((rtems_task_argument) &bsp_boot_cmdline)
761#endif
762
763#ifndef CONFIGURE_INIT_TASK_INITIAL_MODES
764  #define CONFIGURE_INIT_TASK_INITIAL_MODES RTEMS_NO_PREEMPT
765#endif
766
767#ifndef CONFIGURE_INIT_TASK_ARGUMENTS
768  #define CONFIGURE_INIT_TASK_ARGUMENTS     0
769#endif
770
771#ifdef CONFIGURE_INIT
772  rtems_initialization_tasks_table Initialization_tasks[] = {
773    { CONFIGURE_INIT_TASK_NAME,
774      CONFIGURE_INIT_TASK_STACK_SIZE,
775      CONFIGURE_INIT_TASK_PRIORITY,
776      CONFIGURE_INIT_TASK_ATTRIBUTES,
777      CONFIGURE_INIT_TASK_ENTRY_POINT,
778      CONFIGURE_INIT_TASK_INITIAL_MODES,
779      CONFIGURE_INIT_TASK_ARGUMENTS
780    }
781  };
782#endif
783
784#define CONFIGURE_INIT_TASK_TABLE Initialization_tasks
785
786#define CONFIGURE_INIT_TASK_TABLE_SIZE \
787  sizeof(CONFIGURE_INIT_TASK_TABLE) / sizeof(rtems_initialization_tasks_table)
788
789#endif    /* CONFIGURE_HAS_OWN_INIT_TASK_TABLE */
790
791#else     /* CONFIGURE_RTEMS_INIT_TASKS_TABLE */
792
793#define CONFIGURE_INIT_TASK_TABLE      NULL
794#define CONFIGURE_INIT_TASK_TABLE_SIZE 0
795#define CONFIGURE_INIT_TASK_STACK_SIZE 0
796
797#endif
798
799/*
800 *  Default Device Driver Table.  Each driver needed by the test is explicitly
801 *  choosen by that test.  There is always a null driver entry.
802 */
803
804#define NULL_DRIVER_TABLE_ENTRY \
805 { NULL, NULL, NULL, NULL, NULL, NULL }
806
807#ifdef CONFIGURE_APPLICATION_NEEDS_CONSOLE_DRIVER
808  #include <rtems/console.h>
809#endif
810
811#ifdef CONFIGURE_APPLICATION_NEEDS_CLOCK_DRIVER
812  #include <rtems/clockdrv.h>
813#endif
814
815#ifdef CONFIGURE_APPLICATION_NEEDS_TIMER_DRIVER
816  #include <rtems/timerdrv.h>
817#endif
818
819#ifdef CONFIGURE_APPLICATION_NEEDS_RTC_DRIVER
820  #include <rtems/rtc.h>
821#endif
822
823#ifdef CONFIGURE_APPLICATION_NEEDS_WATCHDOG_DRIVER
824  #include <rtems/watchdogdrv.h>
825#endif
826
827#ifdef CONFIGURE_APPLICATION_NEEDS_FRAME_BUFFER_DRIVER
828  #include <rtems/framebuffer.h>
829#endif
830
831#ifdef CONFIGURE_APPLICATION_NEEDS_STUB_DRIVER
832  #include <rtems/devnull.h>
833#endif
834
835#ifdef CONFIGURE_APPLICATION_NEEDS_IDE_DRIVER
836  /* the ide driver needs the ATA driver */
837  #ifndef CONFIGURE_APPLICATION_NEEDS_ATA_DRIVER
838    #define CONFIGURE_APPLICATION_NEEDS_ATA_DRIVER
839  #endif
840  #include <libchip/ide_ctrl.h>
841#endif
842
843#ifdef CONFIGURE_APPLICATION_NEEDS_ATA_DRIVER
844  #include <libchip/ata.h>
845#endif
846
847#ifndef CONFIGURE_HAS_OWN_DEVICE_DRIVER_TABLE
848
849#ifdef CONFIGURE_INIT
850  rtems_driver_address_table Device_drivers[] = {
851    #ifdef CONFIGURE_BSP_PREREQUISITE_DRIVERS
852      CONFIGURE_BSP_PREREQUISITE_DRIVERS,
853    #endif
854    #ifdef CONFIGURE_APPLICATION_PREREQUISITE_DRIVERS
855      CONFIGURE_APPLICATION_PREREQUISITE_DRIVERS,
856    #endif
857    #ifdef CONFIGURE_APPLICATION_NEEDS_CONSOLE_DRIVER
858      CONSOLE_DRIVER_TABLE_ENTRY,
859    #endif
860    #ifdef CONFIGURE_APPLICATION_NEEDS_CLOCK_DRIVER
861      CLOCK_DRIVER_TABLE_ENTRY,
862    #endif
863    #ifdef CONFIGURE_APPLICATION_NEEDS_RTC_DRIVER
864      RTC_DRIVER_TABLE_ENTRY,
865    #endif
866    #ifdef CONFIGURE_APPLICATION_NEEDS_WATCHDOG_DRIVER
867      WATCHDOG_DRIVER_TABLE_ENTRY,
868    #endif
869    #ifdef CONFIGURE_APPLICATION_NEEDS_STUB_DRIVER
870      DEVNULL_DRIVER_TABLE_ENTRY,
871    #endif
872    #ifdef CONFIGURE_APPLICATION_NEEDS_IDE_DRIVER
873      IDE_CONTROLLER_DRIVER_TABLE_ENTRY,
874    #endif
875    #ifdef CONFIGURE_APPLICATION_NEEDS_ATA_DRIVER
876      ATA_DRIVER_TABLE_ENTRY,
877    #endif
878    #ifdef CONFIGURE_APPLICATION_NEEDS_FRAME_BUFFER_DRIVER
879      FRAME_BUFFER_DRIVER_TABLE_ENTRY,
880    #endif
881    #ifdef CONFIGURE_APPLICATION_EXTRA_DRIVERS
882      CONFIGURE_APPLICATION_EXTRA_DRIVERS,
883    #endif
884    #ifdef CONFIGURE_APPLICATION_NEEDS_NULL_DRIVER
885      NULL_DRIVER_TABLE_ENTRY
886    #elif !defined(CONFIGURE_APPLICATION_NEEDS_CONSOLE_DRIVER) && \
887        !defined(CONFIGURE_APPLICATION_NEEDS_CLOCK_DRIVER) && \
888        !defined(CONFIGURE_APPLICATION_NEEDS_RTC_DRIVER) && \
889        !defined(CONFIGURE_APPLICATION_NEEDS_STUB_DRIVER) && \
890        !defined(CONFIGURE_APPLICATION_NEEDS_IDE_DRIVER) && \
891        !defined(CONFIGURE_APPLICATION_NEEDS_ATA_DRIVER) && \
892        !defined(CONFIGURE_APPLICATION_NEEDS_FRAME_BUFFER_DRIVER) && \
893        !defined(CONFIGURE_APPLICATION_EXTRA_DRIVERS)
894      NULL_DRIVER_TABLE_ENTRY
895    #endif
896  };
897#endif
898
899#endif  /* CONFIGURE_HAS_OWN_DEVICE_DRIVER_TABLE */
900
901/*
902 *  Default the number of drivers per node.  This value may be
903 *  overridden by the user.
904 */
905
906#define CONFIGURE_NUMBER_OF_DRIVERS \
907  ((sizeof(Device_drivers) / sizeof(rtems_driver_address_table)))
908
909/**
910 *  This specifies the maximum number of device drivers that
911 *  can be installed in the system at one time.  It must account
912 *  for both the statically and dynamically installed drivers.
913 */
914#ifndef CONFIGURE_MAXIMUM_DRIVERS
915  #define CONFIGURE_MAXIMUM_DRIVERS CONFIGURE_NUMBER_OF_DRIVERS
916#endif
917
918
919#ifdef CONFIGURE_APPLICATION_NEEDS_ATA_DRIVER
920  /*
921   * configure the priority of the ATA driver task
922   */
923  #ifndef CONFIGURE_ATA_DRIVER_TASK_PRIORITY
924    #define CONFIGURE_ATA_DRIVER_TASK_PRIORITY ATA_DRIVER_TASK_DEFAULT_PRIORITY
925  #endif
926  #ifdef CONFIGURE_INIT
927    rtems_task_priority rtems_ata_driver_task_priority
928      = CONFIGURE_ATA_DRIVER_TASK_PRIORITY;
929  #endif /* CONFIGURE_INIT */
930#endif
931
932/*
933 * add bdbuf configuration and values for swapout task priority
934 */
935#ifdef CONFIGURE_APPLICATION_NEEDS_LIBBLOCK
936  #include <rtems/bdbuf.h>
937  /*
938   * configure the bdbuf cache parameters
939   */
940  #ifndef CONFIGURE_BDBUF_MAX_READ_AHEAD_BLOCKS
941    #define CONFIGURE_BDBUF_MAX_READ_AHEAD_BLOCKS \
942                              RTEMS_BDBUF_MAX_READ_AHEAD_BLOCKS_DEFAULT
943  #endif
944  #ifndef CONFIGURE_BDBUF_MAX_WRITE_BLOCKS
945    #define CONFIGURE_BDBUF_MAX_WRITE_BLOCKS \
946                              RTEMS_BDBUF_MAX_WRITE_BLOCKS_DEFAULT
947  #endif
948  #ifndef CONFIGURE_SWAPOUT_TASK_PRIORITY
949    #define CONFIGURE_SWAPOUT_TASK_PRIORITY \
950                              RTEMS_BDBUF_SWAPOUT_TASK_PRIORITY_DEFAULT
951  #endif
952  #ifndef CONFIGURE_SWAPOUT_SWAP_PERIOD
953    #define CONFIGURE_SWAPOUT_SWAP_PERIOD \
954                              RTEMS_BDBUF_SWAPOUT_TASK_SWAP_PERIOD_DEFAULT
955  #endif
956  #ifndef CONFIGURE_SWAPOUT_BLOCK_HOLD
957    #define CONFIGURE_SWAPOUT_BLOCK_HOLD \
958                              RTEMS_BDBUF_SWAPOUT_TASK_BLOCK_HOLD_DEFAULT
959  #endif
960  #ifndef CONFIGURE_SWAPOUT_WORKER_TASKS
961    #define CONFIGURE_SWAPOUT_WORKER_TASKS \
962                              RTEMS_BDBUF_SWAPOUT_WORKER_TASKS_DEFAULT
963  #endif
964  #ifndef CONFIGURE_SWAPOUT_WORKER_TASK_PRIORITY
965    #define CONFIGURE_SWAPOUT_WORKER_TASK_PRIORITY \
966                              RTEMS_BDBUF_SWAPOUT_WORKER_TASK_PRIORITY_DEFAULT
967  #endif
968  #ifndef CONFIGURE_BDBUF_CACHE_MEMORY_SIZE
969    #define CONFIGURE_BDBUF_CACHE_MEMORY_SIZE \
970                              RTEMS_BDBUF_CACHE_MEMORY_SIZE_DEFAULT
971  #endif
972  #ifndef CONFIGURE_BDBUF_BUFFER_MIN_SIZE
973    #define CONFIGURE_BDBUF_BUFFER_MIN_SIZE \
974                              RTEMS_BDBUF_BUFFER_MIN_SIZE_DEFAULT
975  #endif
976  #ifndef CONFIGURE_BDBUF_BUFFER_MAX_SIZE
977    #define CONFIGURE_BDBUF_BUFFER_MAX_SIZE \
978                              RTEMS_BDBUF_BUFFER_MAX_SIZE_DEFAULT
979  #endif
980  #ifdef CONFIGURE_INIT
981    const rtems_bdbuf_config rtems_bdbuf_configuration = {
982      CONFIGURE_BDBUF_MAX_READ_AHEAD_BLOCKS,
983      CONFIGURE_BDBUF_MAX_WRITE_BLOCKS,
984      CONFIGURE_SWAPOUT_TASK_PRIORITY,
985      CONFIGURE_SWAPOUT_SWAP_PERIOD,
986      CONFIGURE_SWAPOUT_BLOCK_HOLD,
987      CONFIGURE_SWAPOUT_WORKER_TASKS,
988      CONFIGURE_SWAPOUT_WORKER_TASK_PRIORITY,
989      CONFIGURE_BDBUF_CACHE_MEMORY_SIZE,
990      CONFIGURE_BDBUF_BUFFER_MIN_SIZE,
991      CONFIGURE_BDBUF_BUFFER_MAX_SIZE
992    };
993  #endif
994
995  /*
996   *  Semaphores:
997   *    o disk lock
998   *    o bdbuf lock
999   *    o bdbuf sync lock
1000   *    o bdbuf access condition
1001   *    o bdbuf transfer condition
1002   *    o bdbuf buffer condition
1003   */
1004  #define CONFIGURE_LIBBLOCK_SEMAPHORES 6
1005
1006  #if defined(CONFIGURE_HAS_OWN_BDBUF_TABLE) || \
1007      defined(CONFIGURE_BDBUF_BUFFER_SIZE) || \
1008      defined(CONFIGURE_BDBUF_BUFFER_COUNT)
1009    #error BDBUF Cache does not use a buffer configuration table. Please remove.
1010  #endif
1011#else
1012  #define CONFIGURE_LIBBLOCK_SEMAPHORES 0
1013#endif /* CONFIGURE_APPLICATION_NEEDS_LIBBLOCK */
1014
1015#if defined(RTEMS_MULTIPROCESSING)
1016  /*
1017   *  Default Multiprocessing Configuration Table.  The defaults are
1018   *  appropriate for most of the RTEMS Multiprocessor Test Suite.  Each
1019   *  value may be overridden within each test to customize the environment.
1020   */
1021
1022  #ifdef CONFIGURE_MP_APPLICATION
1023    #define CONFIGURE_TIMER_FOR_SHARED_MEMORY_DRIVER 1
1024
1025    #ifndef CONFIGURE_HAS_OWN_MULTIPROCESSING_TABLE
1026
1027      #ifndef CONFIGURE_MP_NODE_NUMBER
1028        #define CONFIGURE_MP_NODE_NUMBER                NODE_NUMBER
1029      #endif
1030
1031      #ifndef CONFIGURE_MP_MAXIMUM_NODES
1032        #define CONFIGURE_MP_MAXIMUM_NODES              2
1033      #endif
1034
1035      #ifndef CONFIGURE_MP_MAXIMUM_GLOBAL_OBJECTS
1036        #define CONFIGURE_MP_MAXIMUM_GLOBAL_OBJECTS     32
1037      #endif
1038      #define CONFIGURE_MEMORY_FOR_GLOBAL_OBJECTS(_global_objects) \
1039        _Configure_Object_RAM((_global_objects), sizeof(Objects_MP_Control))
1040
1041      #ifndef CONFIGURE_MP_MAXIMUM_PROXIES
1042        #define CONFIGURE_MP_MAXIMUM_PROXIES            32
1043      #endif
1044      #define CONFIGURE_MEMORY_FOR_PROXIES(_proxies) \
1045        _Configure_Object_RAM((_proxies) + 1, sizeof(Thread_Proxy_control) )
1046
1047      #ifndef CONFIGURE_EXTRA_MPCI_RECEIVE_SERVER_STACK
1048        #define CONFIGURE_EXTRA_MPCI_RECEIVE_SERVER_STACK 0
1049      #endif
1050
1051      #ifndef CONFIGURE_MP_MPCI_TABLE_POINTER
1052        #include <mpci.h>
1053        #define CONFIGURE_MP_MPCI_TABLE_POINTER         &MPCI_table
1054      #endif
1055
1056      #ifdef CONFIGURE_INIT
1057        rtems_multiprocessing_table Multiprocessing_configuration = {
1058          CONFIGURE_MP_NODE_NUMBER,               /* local node number */
1059          CONFIGURE_MP_MAXIMUM_NODES,             /* maximum # nodes */
1060          CONFIGURE_MP_MAXIMUM_GLOBAL_OBJECTS,    /* maximum # global objects */
1061          CONFIGURE_MP_MAXIMUM_PROXIES,           /* maximum # proxies */
1062          CONFIGURE_EXTRA_MPCI_RECEIVE_SERVER_STACK, /* MPCI stack > minimum */
1063          CONFIGURE_MP_MPCI_TABLE_POINTER         /* ptr to MPCI config table */
1064        };
1065      #endif
1066
1067      #define CONFIGURE_MULTIPROCESSING_TABLE    &Multiprocessing_configuration
1068
1069    #endif /* CONFIGURE_HAS_OWN_MULTIPROCESSING_TABLE */
1070
1071  #else
1072
1073    #define CONFIGURE_MULTIPROCESSING_TABLE    NULL
1074
1075  #endif /* CONFIGURE_MP_APPLICATION */
1076#endif /* RTEMS_MULTIPROCESSING */
1077
1078#ifndef CONFIGURE_TIMER_FOR_SHARED_MEMORY_DRIVER
1079  #define CONFIGURE_TIMER_FOR_SHARED_MEMORY_DRIVER 0
1080#endif
1081
1082
1083/*
1084 *  Default Configuration Table.
1085 */
1086
1087#ifndef CONFIGURE_HAS_OWN_CONFIGURATION_TABLE
1088
1089  #ifndef CONFIGURE_MAXIMUM_TASKS
1090    #define CONFIGURE_MAXIMUM_TASKS               0
1091  #endif
1092
1093  #ifndef CONFIGURE_DISABLE_CLASSIC_API_NOTEPADS
1094    #define CONFIGURE_NOTEPADS_ENABLED           TRUE
1095  #else
1096    #define CONFIGURE_NOTEPADS_ENABLED           FALSE
1097  #endif
1098
1099  #ifndef CONFIGURE_DISABLE_CLASSIC_API_NOTEPADS
1100    #define CONFIGURE_MEMORY_PER_TASK_FOR_CLASSIC_API \
1101      _Configure_From_workspace( sizeof(RTEMS_API_Control) )
1102  #else
1103    #define CONFIGURE_MEMORY_PER_TASK_FOR_CLASSIC_API \
1104      _Configure_From_workspace( sizeof(RTEMS_API_Control) - \
1105        (RTEMS_NUMBER_NOTEPADS * sizeof(uint32_t)))
1106  #endif
1107
1108  /**
1109   *  This macro calculates the memory required for task variables.
1110   *
1111   *  @note Each task variable is individually allocated from the Workspace.
1112   *        Hence, we do the multiplication on the configured size.
1113   */
1114  #ifndef CONFIGURE_MAXIMUM_TASK_VARIABLES
1115    #define CONFIGURE_MAXIMUM_TASK_VARIABLES                     0
1116    #define CONFIGURE_MEMORY_FOR_TASK_VARIABLES(_task_variables) 0
1117  #else
1118    #define CONFIGURE_MEMORY_FOR_TASK_VARIABLES(_task_variables) \
1119      (_task_variables) * \
1120         _Configure_From_workspace(sizeof(rtems_task_variable_t))
1121  #endif
1122
1123  #ifndef CONFIGURE_MAXIMUM_TIMERS
1124    #define CONFIGURE_MAXIMUM_TIMERS             0
1125    #define CONFIGURE_MEMORY_FOR_TIMERS(_timers) 0
1126  #else
1127    #define CONFIGURE_MEMORY_FOR_TIMERS(_timers) \
1128      _Configure_Object_RAM(_timers, sizeof(Timer_Control) )
1129  #endif
1130
1131  #ifndef CONFIGURE_MAXIMUM_SEMAPHORES
1132    #define CONFIGURE_MAXIMUM_SEMAPHORES                 0
1133  #endif
1134
1135  #define CONFIGURE_SEMAPHORES \
1136    (CONFIGURE_MAXIMUM_SEMAPHORES + CONFIGURE_LIBIO_SEMAPHORES + \
1137      CONFIGURE_TERMIOS_SEMAPHORES + CONFIGURE_LIBBLOCK_SEMAPHORES)
1138
1139  /*
1140   * If there are no user or support semaphores defined, then we can assume
1141   * that no memory need be allocated at all for semaphores.
1142   */
1143  #if CONFIGURE_SEMAPHORES == 0
1144    #define CONFIGURE_MEMORY_FOR_SEMAPHORES(_semaphores) 0
1145  #else
1146    #define CONFIGURE_MEMORY_FOR_SEMAPHORES(_semaphores) \
1147      _Configure_Object_RAM(_semaphores, sizeof(Semaphore_Control) )
1148  #endif
1149
1150  #ifndef CONFIGURE_MAXIMUM_MESSAGE_QUEUES
1151    #define CONFIGURE_MAXIMUM_MESSAGE_QUEUES             0
1152    #define CONFIGURE_MEMORY_FOR_MESSAGE_QUEUES(_queues) 0
1153  #else
1154    #define CONFIGURE_MEMORY_FOR_MESSAGE_QUEUES(_queues) \
1155      _Configure_Object_RAM(_queues, sizeof(Message_queue_Control) )
1156  #endif
1157
1158  #ifndef CONFIGURE_MAXIMUM_PARTITIONS
1159    #define CONFIGURE_MAXIMUM_PARTITIONS                 0
1160    #define CONFIGURE_MEMORY_FOR_PARTITIONS(_partitions) 0
1161  #else
1162    #define CONFIGURE_MEMORY_FOR_PARTITIONS(_partitions) \
1163      _Configure_Object_RAM(_partitions, sizeof(Partition_Control) )
1164  #endif
1165
1166  #ifndef CONFIGURE_MAXIMUM_REGIONS
1167    #define CONFIGURE_MAXIMUM_REGIONS              0
1168    #define CONFIGURE_MEMORY_FOR_REGIONS(_regions) 0
1169  #else
1170    #define CONFIGURE_MEMORY_FOR_REGIONS(_regions) \
1171      _Configure_Object_RAM(_regions, sizeof(Region_Control) )
1172  #endif
1173
1174  #ifndef CONFIGURE_MAXIMUM_PORTS
1175    #define CONFIGURE_MAXIMUM_PORTS            0
1176    #define CONFIGURE_MEMORY_FOR_PORTS(_ports) 0
1177  #else
1178    #define CONFIGURE_MEMORY_FOR_PORTS(_ports) \
1179      _Configure_Object_RAM(_ports, sizeof(Dual_ported_memory_Control) )
1180  #endif
1181
1182  #ifndef CONFIGURE_MAXIMUM_PERIODS
1183    #define CONFIGURE_MAXIMUM_PERIODS              0
1184    #define CONFIGURE_MEMORY_FOR_PERIODS(_periods) 0
1185  #else
1186    #define CONFIGURE_MEMORY_FOR_PERIODS(_periods) \
1187      _Configure_Object_RAM(_periods, sizeof(Rate_monotonic_Control) )
1188  #endif
1189
1190  #ifndef CONFIGURE_MAXIMUM_BARRIERS
1191    #define CONFIGURE_MAXIMUM_BARRIERS               0
1192    #define CONFIGURE_MEMORY_FOR_BARRIERS(_barriers) 0
1193  #else
1194    #define CONFIGURE_MEMORY_FOR_BARRIERS(_barriers) \
1195      _Configure_Object_RAM(_barriers, sizeof(Barrier_Control) )
1196  #endif
1197
1198  #ifndef CONFIGURE_MAXIMUM_USER_EXTENSIONS
1199    #define CONFIGURE_MAXIMUM_USER_EXTENSIONS                 0
1200    #define CONFIGURE_MEMORY_FOR_USER_EXTENSIONS(_extensions) 0
1201  #else
1202    #define CONFIGURE_MEMORY_FOR_USER_EXTENSIONS(_extensions) \
1203      _Configure_Object_RAM(_extensions, sizeof(Extension_Control) )
1204  #endif
1205
1206  #ifndef CONFIGURE_MICROSECONDS_PER_TICK
1207    #define CONFIGURE_MICROSECONDS_PER_TICK \
1208            RTEMS_MILLISECONDS_TO_MICROSECONDS(10)
1209  #endif
1210
1211  #ifndef CONFIGURE_TICKS_PER_TIMESLICE
1212    #define CONFIGURE_TICKS_PER_TIMESLICE        50
1213  #endif
1214
1215/*
1216 *  Initial Extension Set
1217 */
1218
1219#ifdef CONFIGURE_INIT
1220#ifdef CONFIGURE_STACK_CHECKER_ENABLED
1221#include <rtems/stackchk.h>
1222#endif
1223#include <rtems/libcsupport.h>
1224
1225#if defined(CONFIGURE_INITIAL_EXTENSIONS) || \
1226    defined(CONFIGURE_STACK_CHECKER_ENABLED) || \
1227    (defined(RTEMS_NEWLIB) && !defined(CONFIGURE_DISABLE_NEWLIB_REENTRANCY))
1228  rtems_extensions_table Configuration_Initial_Extensions[] = {
1229    #if !defined(CONFIGURE_DISABLE_NEWLIB_REENTRANCY)
1230      RTEMS_NEWLIB_EXTENSION,
1231    #endif
1232    #if defined(CONFIGURE_STACK_CHECKER_ENABLED)
1233      RTEMS_STACK_CHECKER_EXTENSION,
1234    #endif
1235    #if defined(CONFIGURE_INITIAL_EXTENSIONS)
1236      CONFIGURE_INITIAL_EXTENSIONS,
1237    #endif
1238  };
1239
1240  #define CONFIGURE_INITIAL_EXTENSION_TABLE Configuration_Initial_Extensions
1241  #define CONFIGURE_NUMBER_OF_INITIAL_EXTENSIONS \
1242    ((sizeof(Configuration_Initial_Extensions) / \
1243      sizeof(rtems_extensions_table)))
1244#else
1245  #define CONFIGURE_INITIAL_EXTENSION_TABLE NULL
1246  #define CONFIGURE_NUMBER_OF_INITIAL_EXTENSIONS 0
1247#endif
1248
1249
1250#endif
1251
1252/*
1253 *  POSIX API Configuration Parameters
1254 */
1255
1256#ifdef RTEMS_POSIX_API
1257
1258  #include <sys/types.h>
1259  #include <signal.h>
1260  #include <limits.h>
1261  #include <mqueue.h>
1262  #include <rtems/posix/barrier.h>
1263  #include <rtems/posix/cond.h>
1264  #include <rtems/posix/mqueue.h>
1265  #include <rtems/posix/mutex.h>
1266  #include <rtems/posix/key.h>
1267  #include <rtems/posix/psignal.h>
1268  #include <rtems/posix/rwlock.h>
1269  #include <rtems/posix/semaphore.h>
1270  #include <rtems/posix/spinlock.h>
1271  #include <rtems/posix/threadsup.h>
1272  #include <rtems/posix/timer.h>
1273
1274  /**
1275   *  Account for the object control structures plus the name
1276   *  of the object to be duplicated.
1277   */
1278  #define _Configure_POSIX_Named_Object_RAM(_number, _size) \
1279    _Configure_Object_RAM( (_number), _size ) + \
1280    ((_number) + _Configure_From_workspace(NAME_MAX) )
1281
1282  #ifndef CONFIGURE_MAXIMUM_POSIX_THREADS
1283    #define CONFIGURE_MAXIMUM_POSIX_THREADS      0
1284  #endif
1285
1286  #define CONFIGURE_MEMORY_PER_TASK_FOR_POSIX_API \
1287    _Configure_From_workspace( \
1288      sizeof (POSIX_API_Control) + \
1289     (sizeof (void *) * (CONFIGURE_MAXIMUM_POSIX_KEYS)) \
1290    )
1291
1292  #ifndef CONFIGURE_MAXIMUM_POSIX_MUTEXES
1293    #define CONFIGURE_MAXIMUM_POSIX_MUTEXES              0
1294    #define CONFIGURE_MEMORY_FOR_POSIX_MUTEXES(_mutexes) 0
1295  #else
1296    #define CONFIGURE_MEMORY_FOR_POSIX_MUTEXES(_mutexes) \
1297      _Configure_Object_RAM(_mutexes, sizeof(POSIX_Mutex_Control) )
1298  #endif
1299
1300  #ifndef CONFIGURE_MAXIMUM_POSIX_CONDITION_VARIABLES
1301    #define CONFIGURE_MAXIMUM_POSIX_CONDITION_VARIABLES               0
1302    #define CONFIGURE_MEMORY_FOR_POSIX_CONDITION_VARIABLES(_condvars) 0
1303  #else
1304    #define CONFIGURE_MEMORY_FOR_POSIX_CONDITION_VARIABLES(_condvars) \
1305        _Configure_Object_RAM(_condvars, \
1306                            sizeof(POSIX_Condition_variables_Control) )
1307  #endif
1308
1309  #ifndef CONFIGURE_MAXIMUM_POSIX_KEYS
1310    #define CONFIGURE_MAXIMUM_POSIX_KEYS           0
1311    #define CONFIGURE_MEMORY_FOR_POSIX_KEYS(_keys) 0
1312  #else
1313    #define CONFIGURE_MEMORY_FOR_POSIX_KEYS(_keys) \
1314      _Configure_Object_RAM(_keys, sizeof(POSIX_Keys_Control) )
1315  #endif
1316
1317  #ifndef CONFIGURE_MAXIMUM_POSIX_TIMERS
1318    #define CONFIGURE_MAXIMUM_POSIX_TIMERS             0
1319    #define CONFIGURE_MEMORY_FOR_POSIX_TIMERS(_timers) 0
1320  #else
1321    #define CONFIGURE_MEMORY_FOR_POSIX_TIMERS(_timers) \
1322      _Configure_Object_RAM(_timers, sizeof(POSIX_Timer_Control) )
1323  #endif
1324
1325  #ifndef CONFIGURE_MAXIMUM_POSIX_QUEUED_SIGNALS
1326    #define CONFIGURE_MAXIMUM_POSIX_QUEUED_SIGNALS                     0
1327    #define CONFIGURE_MEMORY_FOR_POSIX_QUEUED_SIGNALS(_queued_signals) 0
1328  #else
1329    #define CONFIGURE_MEMORY_FOR_POSIX_QUEUED_SIGNALS(_queued_signals) \
1330      _Configure_From_workspace( \
1331        (_queued_signals) * (sizeof(POSIX_signals_Siginfo_node)) )
1332  #endif
1333
1334  #ifndef CONFIGURE_MAXIMUM_POSIX_MESSAGE_QUEUES
1335    #define CONFIGURE_MAXIMUM_POSIX_MESSAGE_QUEUES                     0
1336    #define CONFIGURE_MEMORY_FOR_POSIX_MESSAGE_QUEUES(_message_queues) 0
1337    #define CONFIGURE_MAXIMUM_POSIX_MESSAGE_QUEUE_DESCRIPTORS          0
1338    #define CONFIGURE_MEMORY_FOR_POSIX_MESSAGE_QUEUE_DESCRIPTORS(_fds) 0
1339  #else
1340    #define CONFIGURE_MEMORY_FOR_POSIX_MESSAGE_QUEUES(_message_queues) \
1341      _Configure_POSIX_Named_Object_RAM( \
1342         _message_queues, sizeof(POSIX_Message_queue_Control) )
1343
1344    /* default to same number */
1345    #ifndef CONFIGURE_MAXIMUM_POSIX_MESSAGE_QUEUE_DESCRIPTORS
1346       #define CONFIGURE_MAXIMUM_POSIX_MESSAGE_QUEUE_DESCRIPTORS \
1347               CONFIGURE_MAXIMUM_POSIX_MESSAGE_QUEUES
1348    #endif
1349
1350    #define CONFIGURE_MEMORY_FOR_POSIX_MESSAGE_QUEUE_DESCRIPTORS(_mqueue_fds) \
1351      _Configure_POSIX_Named_Object_RAM( \
1352         _mqueue_fds, sizeof(POSIX_Message_queue_Control_fd) )
1353  #endif
1354
1355  #ifndef CONFIGURE_MAXIMUM_POSIX_SEMAPHORES
1356    #define CONFIGURE_MAXIMUM_POSIX_SEMAPHORES                 0
1357    #define CONFIGURE_MEMORY_FOR_POSIX_SEMAPHORES(_semaphores) 0
1358  #else
1359    #define CONFIGURE_MEMORY_FOR_POSIX_SEMAPHORES(_semaphores) \
1360      _Configure_POSIX_Named_Object_RAM( \
1361         _semaphores, sizeof(POSIX_Semaphore_Control) )
1362  #endif
1363
1364  #ifndef CONFIGURE_MAXIMUM_POSIX_BARRIERS
1365    #define CONFIGURE_MAXIMUM_POSIX_BARRIERS               0
1366    #define CONFIGURE_MEMORY_FOR_POSIX_BARRIERS(_barriers) 0
1367  #else
1368    #define CONFIGURE_MEMORY_FOR_POSIX_BARRIERS(_barriers) \
1369      _Configure_Object_RAM(_barriers, sizeof(POSIX_Barrier_Control) )
1370  #endif
1371
1372  #ifndef CONFIGURE_MAXIMUM_POSIX_SPINLOCKS
1373    #define CONFIGURE_MAXIMUM_POSIX_SPINLOCKS                0
1374    #define CONFIGURE_MEMORY_FOR_POSIX_SPINLOCKS(_spinlocks) 0
1375  #else
1376    #define CONFIGURE_MEMORY_FOR_POSIX_SPINLOCKS(_spinlocks) \
1377      _Configure_Object_RAM(_spinlocks, sizeof(POSIX_Spinlock_Control) )
1378  #endif
1379
1380  #ifndef CONFIGURE_MAXIMUM_POSIX_RWLOCKS
1381    #define CONFIGURE_MAXIMUM_POSIX_RWLOCKS              0
1382    #define CONFIGURE_MEMORY_FOR_POSIX_RWLOCKS(_rwlocks) 0
1383  #else
1384    #define CONFIGURE_MEMORY_FOR_POSIX_RWLOCKS(_rwlocks) \
1385      _Configure_Object_RAM(_rwlocks, sizeof(POSIX_RWLock_Control) )
1386  #endif
1387
1388  #ifdef CONFIGURE_POSIX_INIT_THREAD_TABLE
1389
1390    #ifdef CONFIGURE_POSIX_HAS_OWN_INIT_THREAD_TABLE
1391
1392      /*
1393       *  The user is defining their own table information and setting the
1394       *  appropriate variables for the POSIX Initialization Thread Table.
1395       */
1396
1397    #else
1398
1399      #ifndef CONFIGURE_POSIX_INIT_THREAD_ENTRY_POINT
1400        #define CONFIGURE_POSIX_INIT_THREAD_ENTRY_POINT   POSIX_Init
1401      #endif
1402
1403      #ifndef CONFIGURE_POSIX_INIT_THREAD_STACK_SIZE
1404        #define CONFIGURE_POSIX_INIT_THREAD_STACK_SIZE \
1405                (CONFIGURE_MINIMUM_TASK_STACK_SIZE * 2)
1406      #endif
1407
1408      #ifdef CONFIGURE_INIT
1409        posix_initialization_threads_table POSIX_Initialization_threads[] = {
1410          { CONFIGURE_POSIX_INIT_THREAD_ENTRY_POINT, \
1411              CONFIGURE_POSIX_INIT_THREAD_STACK_SIZE }
1412        };
1413      #endif
1414
1415      #define CONFIGURE_POSIX_INIT_THREAD_TABLE_NAME \
1416              POSIX_Initialization_threads
1417
1418      #define CONFIGURE_POSIX_INIT_THREAD_TABLE_SIZE \
1419        sizeof(CONFIGURE_POSIX_INIT_THREAD_TABLE_NAME) / \
1420            sizeof(posix_initialization_threads_table)
1421
1422    #endif    /* CONFIGURE_POSIX_HAS_OWN_INIT_TASK_TABLE */
1423
1424  #else     /* CONFIGURE_POSIX_INIT_THREAD_TABLE */
1425
1426    #define CONFIGURE_POSIX_INIT_THREAD_TABLE_NAME NULL
1427    #define CONFIGURE_POSIX_INIT_THREAD_TABLE_SIZE 0
1428
1429  #endif
1430
1431  #define CONFIGURE_MEMORY_FOR_POSIX \
1432    ( CONFIGURE_MEMORY_FOR_POSIX_MUTEXES( CONFIGURE_MAXIMUM_POSIX_MUTEXES ) + \
1433      CONFIGURE_MEMORY_FOR_POSIX_CONDITION_VARIABLES( \
1434          CONFIGURE_MAXIMUM_POSIX_CONDITION_VARIABLES ) + \
1435      CONFIGURE_MEMORY_FOR_POSIX_KEYS( CONFIGURE_MAXIMUM_POSIX_KEYS ) + \
1436      CONFIGURE_MEMORY_FOR_POSIX_QUEUED_SIGNALS( \
1437          CONFIGURE_MAXIMUM_POSIX_QUEUED_SIGNALS ) + \
1438      CONFIGURE_MEMORY_FOR_POSIX_MESSAGE_QUEUES( \
1439          CONFIGURE_MAXIMUM_POSIX_MESSAGE_QUEUES ) + \
1440      CONFIGURE_MEMORY_FOR_POSIX_MESSAGE_QUEUE_DESCRIPTORS( \
1441          CONFIGURE_MAXIMUM_POSIX_MESSAGE_QUEUE_DESCRIPTORS ) + \
1442      CONFIGURE_MEMORY_FOR_POSIX_SEMAPHORES( \
1443          CONFIGURE_MAXIMUM_POSIX_SEMAPHORES ) + \
1444      CONFIGURE_MEMORY_FOR_POSIX_BARRIERS(CONFIGURE_MAXIMUM_POSIX_BARRIERS) + \
1445      CONFIGURE_MEMORY_FOR_POSIX_SPINLOCKS( \
1446          CONFIGURE_MAXIMUM_POSIX_SPINLOCKS ) + \
1447      CONFIGURE_MEMORY_FOR_POSIX_RWLOCKS( \
1448          CONFIGURE_MAXIMUM_POSIX_RWLOCKS ) + \
1449      CONFIGURE_MEMORY_FOR_POSIX_TIMERS( CONFIGURE_MAXIMUM_POSIX_TIMERS ) + \
1450      (CONFIGURE_POSIX_INIT_THREAD_STACK_SIZE) \
1451     )
1452#else
1453
1454  #define CONFIGURE_MAXIMUM_POSIX_THREADS         0
1455  #define CONFIGURE_MEMORY_PER_TASK_FOR_POSIX_API 0
1456  #define CONFIGURE_MEMORY_FOR_POSIX              0
1457
1458#endif    /* RTEMS_POSIX_API */
1459
1460#ifndef CONFIGURE_POSIX_INIT_THREAD_STACK_SIZE
1461  #define CONFIGURE_POSIX_INIT_THREAD_STACK_SIZE    0
1462#endif
1463
1464/*
1465 *  This block of defines are for applications which use GNAT/RTEMS.
1466 *  GNAT implements each Ada task as a POSIX thread.
1467 */
1468#ifdef CONFIGURE_GNAT_RTEMS
1469
1470  /**
1471   *  The GNAT run-time needs something less than (10) POSIX mutexes.
1472   *  We may be able to get by with less but why bother.
1473   */
1474  #define CONFIGURE_GNAT_MUTEXES 10
1475
1476  /**
1477   *  This is the maximum number of Ada tasks which can be concurrently
1478   *  in existence.  Twenty (20) are required to run all tests in the
1479   *  ACATS (formerly ACVC).
1480   */
1481  #ifndef CONFIGURE_MAXIMUM_ADA_TASKS
1482    #define CONFIGURE_MAXIMUM_ADA_TASKS  20
1483  #endif
1484
1485  /**
1486   * This is the number of non-Ada tasks which invoked Ada code.
1487   */
1488  #ifndef CONFIGURE_MAXIMUM_FAKE_ADA_TASKS
1489    #define CONFIGURE_MAXIMUM_FAKE_ADA_TASKS 0
1490  #endif
1491
1492  /**
1493   * Ada tasks are allocated twice the minimum stack space.
1494   */
1495  #define CONFIGURE_ADA_TASKS_STACK \
1496    (CONFIGURE_MAXIMUM_ADA_TASKS * \
1497      (CONFIGURE_MINIMUM_TASK_STACK_SIZE + (6 * 1024)))
1498
1499#else
1500  #define CONFIGURE_GNAT_MUTEXES           0
1501  #define CONFIGURE_MAXIMUM_ADA_TASKS      0
1502  #define CONFIGURE_MAXIMUM_FAKE_ADA_TASKS 0
1503  #define CONFIGURE_ADA_TASKS_STACK        0
1504#endif
1505
1506/*
1507 *  ITRON API Configuration Parameters
1508 */
1509
1510#ifdef RTEMS_ITRON_API
1511
1512  #include <rtems/itron.h>
1513  #include <rtems/itron/config.h>
1514  #include <rtems/itron/eventflags.h>
1515  #include <rtems/itron/fmempool.h>
1516  #include <rtems/itron/mbox.h>
1517  #include <rtems/itron/msgbuffer.h>
1518  #include <rtems/itron/port.h>
1519  #include <rtems/itron/semaphore.h>
1520  #include <rtems/itron/task.h>
1521  #include <rtems/itron/vmempool.h>
1522
1523  #ifndef CONFIGURE_MAXIMUM_ITRON_TASKS
1524    #define CONFIGURE_MAXIMUM_ITRON_TASKS      0
1525  #endif
1526  #define CONFIGURE_MEMORY_PER_TASK_FOR_ITRON_API 0
1527
1528  #ifndef CONFIGURE_MAXIMUM_ITRON_SEMAPHORES
1529    #define CONFIGURE_MAXIMUM_ITRON_SEMAPHORES                 0
1530    #define CONFIGURE_MEMORY_FOR_ITRON_SEMAPHORES(_semaphores) 0
1531  #else
1532    #define CONFIGURE_MEMORY_FOR_ITRON_SEMAPHORES(_semaphores) \
1533      _Configure_Object_RAM(_semaphores, sizeof(ITRON_Semaphore_Control))
1534  #endif
1535
1536  #ifndef CONFIGURE_MAXIMUM_ITRON_EVENTFLAGS
1537    #define CONFIGURE_MAXIMUM_ITRON_EVENTFLAGS                 0
1538    #define CONFIGURE_MEMORY_FOR_ITRON_EVENTFLAGS(_eventflags) 0
1539  #else
1540    #define CONFIGURE_MEMORY_FOR_ITRON_EVENTFLAGS(_eventflags) \
1541      _Configure_Object_RAM(_eventflags, sizeof(ITRON_Eventflags_Control))
1542  #endif
1543
1544  #ifndef CONFIGURE_MAXIMUM_ITRON_MAILBOXES
1545    #define CONFIGURE_MAXIMUM_ITRON_MAILBOXES                0
1546    #define CONFIGURE_MEMORY_FOR_ITRON_MAILBOXES(_mailboxes) 0
1547  #else
1548    #define CONFIGURE_MEMORY_FOR_ITRON_MAILBOXES(_mailboxes) \
1549      _Configure_Object_RAM(_mailboxes, sizeof(ITRON_Mailbox_Control))
1550  #endif
1551
1552  #ifndef CONFIGURE_MAXIMUM_ITRON_MESSAGE_BUFFERS
1553    #define CONFIGURE_MAXIMUM_ITRON_MESSAGE_BUFFERS                      0
1554    #define CONFIGURE_MEMORY_FOR_ITRON_MESSAGE_BUFFERS(_message_buffers) 0
1555  #else
1556    #define CONFIGURE_MEMORY_FOR_ITRON_MESSAGE_BUFFERS(_message_buffers) \
1557      _Configure_Object_RAM(_message_buffers, \
1558        sizeof(ITRON_Message_buffer_Control))
1559  #endif
1560
1561  #ifndef CONFIGURE_MAXIMUM_ITRON_PORTS
1562    #define CONFIGURE_MAXIMUM_ITRON_PORTS            0
1563    #define CONFIGURE_MEMORY_FOR_ITRON_PORTS(_ports) 0
1564  #else
1565    #define CONFIGURE_MEMORY_FOR_ITRON_PORTS(_ports) \
1566      _Configure_Object_RAM(_ports, sizeof(ITRON_Port_Control))
1567  #endif
1568
1569  #ifndef CONFIGURE_MAXIMUM_ITRON_MEMORY_POOLS
1570    #define CONFIGURE_MAXIMUM_ITRON_MEMORY_POOLS            0
1571    #define CONFIGURE_MEMORY_FOR_ITRON_MEMORY_POOLS(_pools) 0
1572  #else
1573    #define CONFIGURE_MEMORY_FOR_ITRON_MEMORY_POOLS(_pools) \
1574      _Configure_Object_RAM( _pools, sizeof(ITRON_Variable_memory_pool_Control))
1575  #endif
1576
1577  #ifndef CONFIGURE_MAXIMUM_ITRON_FIXED_MEMORY_POOLS
1578    #define CONFIGURE_MAXIMUM_ITRON_FIXED_MEMORY_POOLS            0
1579    #define CONFIGURE_MEMORY_FOR_ITRON_FIXED_MEMORY_POOLS(_pools) 0
1580  #else
1581    #define CONFIGURE_MEMORY_FOR_ITRON_FIXED_MEMORY_POOLS(_pools) \
1582      _Configure_Object_RAM(_pools, sizeof(ITRON_Fixed_memory_pool_Control))
1583  #endif
1584
1585  #ifdef CONFIGURE_ITRON_INIT_TASK_TABLE
1586
1587    #ifdef CONFIGURE_ITRON_HAS_OWN_INIT_TASK_TABLE
1588
1589      /*
1590       *  The user is defining their own table information and setting the
1591       *  appropriate variables for the ITRON Initialization Task Table.
1592       */
1593
1594    #else
1595
1596      #ifndef CONFIGURE_ITRON_INIT_TASK_ENTRY_POINT
1597        #define CONFIGURE_ITRON_INIT_TASK_ENTRY_POINT   ITRON_Init
1598      #endif
1599
1600      #ifndef CONFIGURE_ITRON_INIT_TASK_ATTRIBUTES
1601        #define CONFIGURE_ITRON_INIT_TASK_ATTRIBUTES    TA_HLNG
1602      #endif
1603
1604      #ifndef CONFIGURE_ITRON_INIT_TASK_PRIORITY
1605        #define CONFIGURE_ITRON_INIT_TASK_PRIORITY      1
1606      #endif
1607
1608      #ifndef CONFIGURE_ITRON_INIT_TASK_STACK_SIZE
1609        #define CONFIGURE_ITRON_INIT_TASK_STACK_SIZE \
1610                CONFIGURE_MINIMUM_TASK_STACK_SIZE
1611      #endif
1612
1613      #ifdef CONFIGURE_INIT
1614        itron_initialization_tasks_table ITRON_Initialization_tasks[] = {
1615          { 1,                                    /* ID */
1616            { (VP) 0,                                /* exinfo */
1617              CONFIGURE_ITRON_INIT_TASK_ATTRIBUTES,  /* task attributes */
1618              CONFIGURE_ITRON_INIT_TASK_ENTRY_POINT, /* task start address */
1619              CONFIGURE_ITRON_INIT_TASK_PRIORITY,    /* initial task priority */
1620              CONFIGURE_ITRON_INIT_TASK_STACK_SIZE   /* stack size */
1621            }
1622          }
1623        };
1624      #endif
1625
1626      #define CONFIGURE_ITRON_INIT_TASK_TABLE_NAME ITRON_Initialization_tasks
1627
1628      #define CONFIGURE_ITRON_INIT_TASK_TABLE_SIZE \
1629        sizeof(CONFIGURE_ITRON_INIT_TASK_TABLE_NAME) / \
1630            sizeof(itron_initialization_tasks_table)
1631
1632    #endif    /* CONFIGURE_ITRON_HAS_OWN_INIT_TASK_TABLE */
1633
1634  #else     /* CONFIGURE_ITRON_INIT_TASK_TABLE */
1635
1636    #define CONFIGURE_ITRON_INIT_TASK_TABLE_NAME NULL
1637    #define CONFIGURE_ITRON_INIT_TASK_TABLE_SIZE 0
1638    #define CONFIGURE_ITRON_INIT_TASK_STACK_SIZE 0
1639
1640  #endif
1641
1642  #define CONFIGURE_MEMORY_FOR_ITRON \
1643    ( CONFIGURE_MEMORY_FOR_ITRON_SEMAPHORES( \
1644          CONFIGURE_MAXIMUM_ITRON_SEMAPHORES ) + \
1645      CONFIGURE_MEMORY_FOR_ITRON_EVENTFLAGS( \
1646          CONFIGURE_MAXIMUM_ITRON_EVENTFLAGS ) + \
1647      CONFIGURE_MEMORY_FOR_ITRON_MAILBOXES( \
1648          CONFIGURE_MAXIMUM_ITRON_MAILBOXES ) + \
1649      CONFIGURE_MEMORY_FOR_ITRON_MESSAGE_BUFFERS( \
1650          CONFIGURE_MAXIMUM_ITRON_MESSAGE_BUFFERS ) + \
1651      CONFIGURE_MEMORY_FOR_ITRON_PORTS( \
1652          CONFIGURE_MAXIMUM_ITRON_PORTS ) + \
1653      CONFIGURE_MEMORY_FOR_ITRON_MEMORY_POOLS( \
1654          CONFIGURE_MAXIMUM_ITRON_MEMORY_POOLS ) + \
1655      CONFIGURE_MEMORY_FOR_ITRON_FIXED_MEMORY_POOLS( \
1656          CONFIGURE_MAXIMUM_ITRON_FIXED_MEMORY_POOLS ) + \
1657      CONFIGURE_ITRON_INIT_TASK_STACK_SIZE \
1658     )
1659
1660#else
1661
1662  #define CONFIGURE_MAXIMUM_ITRON_TASKS               0
1663  #define CONFIGURE_MAXIMUM_ITRON_SEMAPHORES          0
1664  #define CONFIGURE_MAXIMUM_ITRON_EVENTFLAGS          0
1665  #define CONFIGURE_MAXIMUM_ITRON_MAILBOXES           0
1666  #define CONFIGURE_MAXIMUM_ITRON_MESSAGE_BUFFERS     0
1667  #define CONFIGURE_MAXIMUM_ITRON_PORTS               0
1668  #define CONFIGURE_MAXIMUM_ITRON_MEMORY_POOLS        0
1669  #define CONFIGURE_MAXIMUM_ITRON_FIXED_MEMORY_POOLS  0
1670  #define CONFIGURE_MEMORY_PER_TASK_FOR_ITRON_API     0
1671  #define CONFIGURE_MEMORY_FOR_ITRON                  0
1672
1673#endif    /* RTEMS_ITRON_API */
1674
1675/**
1676 *  This macro specifies the amount of memory to be reserved for the
1677 *  Newlib C Library reentrancy structure -- if we are using newlib.
1678 */
1679
1680#if (defined(RTEMS_NEWLIB) && !defined(CONFIGURE_DISABLE_NEWLIB_REENTRANCY))
1681  #include <reent.h>
1682
1683  #define CONFIGURE_MEMORY_PER_TASK_FOR_NEWLIB \
1684    _Configure_From_workspace(sizeof(struct _reent))
1685#else
1686  #define CONFIGURE_MEMORY_PER_TASK_FOR_NEWLIB 0
1687#endif
1688
1689/*
1690 *  Calculate the RAM size based on the maximum number of objects configured.
1691 */
1692
1693#ifndef CONFIGURE_EXECUTIVE_RAM_SIZE
1694
1695/**
1696 *  Account for allocating the following per object
1697 *    + array of object control structures
1698 *    + local pointer table -- pointer per object plus a zero'th
1699 *      entry in the local pointer table.
1700 */
1701
1702#define CONFIGURE_MEMORY_FOR_TASKS(_tasks, _number_FP_tasks) \
1703 ( \
1704  _Configure_Object_RAM(_tasks, sizeof(Thread_Control)) + \
1705  (_Configure_Max_Objects(_tasks) * \
1706   (_Configure_From_workspace(CONFIGURE_MINIMUM_TASK_STACK_SIZE) + \
1707    CONFIGURE_MEMORY_PER_TASK_FOR_CLASSIC_API + \
1708    CONFIGURE_MEMORY_PER_TASK_FOR_NEWLIB + \
1709    CONFIGURE_MEMORY_PER_TASK_FOR_POSIX_API + \
1710    CONFIGURE_MEMORY_PER_TASK_FOR_ITRON_API))  + \
1711  _Configure_From_workspace( \
1712    _Configure_Max_Objects(_number_FP_tasks) * CONTEXT_FP_SIZE) + \
1713  _Configure_From_workspace( \
1714          (CONFIGURE_MAXIMUM_USER_EXTENSIONS + 1) * sizeof(void *)) \
1715 )
1716
1717/**
1718 *  This defines the amount of memory configured for the multiprocessing
1719 *  support required by this application.
1720 */
1721#ifdef CONFIGURE_MP_APPLICATION
1722  #define CONFIGURE_MEMORY_FOR_MP \
1723    (CONFIGURE_MEMORY_FOR_PROXIES(CONFIGURE_MP_MAXIMUM_PROXIES) + \
1724     CONFIGURE_MEMORY_FOR_GLOBAL_OBJECTS( \
1725             CONFIGURE_MP_MAXIMUM_GLOBAL_OBJECTS) + \
1726     CONFIGURE_MEMORY_FOR_TASKS(1, 1) + \
1727     CONFIGURE_EXTRA_MPCI_RECEIVE_SERVER_STACK \
1728  )
1729#else
1730  #define CONFIGURE_MEMORY_FOR_MP  0
1731#endif
1732
1733/**
1734 *  This is so we can account for tasks with stacks greater than minimum
1735 *  size.  This is in bytes.
1736 */
1737#ifndef CONFIGURE_EXTRA_TASK_STACKS
1738  #define CONFIGURE_EXTRA_TASK_STACKS 0
1739#endif
1740
1741/**
1742 *  The following macro is used to calculate the memory allocated by RTEMS
1743 *  for the message buffers associated with a particular message queue.
1744 *  There is a fixed amount of overhead per message.
1745 */
1746#define CONFIGURE_MESSAGE_BUFFERS_FOR_QUEUE(_messages, _size) \
1747    _Configure_From_workspace( \
1748      (_messages) * ((_size) + sizeof(CORE_message_queue_Buffer_control)))
1749
1750/**
1751 *  This macros is set to the amount of memory required for pending message
1752 *  buffers in bytes.  It should be constructed by adding together a
1753 *  set of values determined by CONFIGURE_MESSAGE_BUFFERS_FOR_QUEUE.
1754 */
1755#ifndef CONFIGURE_MESSAGE_BUFFER_MEMORY
1756  #define CONFIGURE_MESSAGE_BUFFER_MEMORY 0
1757#endif
1758
1759/**
1760 *  This macro is available just in case the confdefs.h file underallocates
1761 *  memory for a particular application.  This lets the user add some extra
1762 *  memory in case something broken and underestimates.
1763 *
1764 *  It is also possible for cases where confdefs.h overallocates memory,
1765 *  you could substract memory from the allocated.  The estimate is just
1766 *  that, an estimate, and assumes worst case alignment and padding on
1767 *  each allocated element.  So in some cases it could be too conservative.
1768 *
1769 *  @note Historically this was used for message buffers.
1770 */
1771#ifndef CONFIGURE_MEMORY_OVERHEAD
1772  #define CONFIGURE_MEMORY_OVERHEAD 0
1773#endif
1774
1775/**
1776 *  On architectures that use Simple Vectored Interrupts, it is RTEMS
1777 *  responsibility to allocate the vector table.  This avoids reserving
1778 *  the memory on architectures that use the Programmable Interrupt
1779 *  Controller Vectored Interrupts.
1780 */
1781#if (CPU_SIMPLE_VECTORED_INTERRUPTS == TRUE)
1782  /*
1783   *  This is a (hopefully) temporary hack.  On the mips, the number of
1784   *  vectors is NOT statically defined.  But it has to be statically
1785   *  defined for this to work.  This is an issue looking for a nice
1786   *  solution.
1787   */
1788  #if defined(__mips__)
1789    #define CONFIGURE_INTERRUPT_VECTOR_TABLE \
1790      _Configure_From_workspace( (sizeof(ISR_Handler_entry) * 256))
1791  #else
1792    #define CONFIGURE_INTERRUPT_VECTOR_TABLE \
1793      _Configure_From_workspace( \
1794        (sizeof(ISR_Handler_entry) * ISR_NUMBER_OF_VECTORS))
1795  #endif
1796#else
1797  #define CONFIGURE_INTERRUPT_VECTOR_TABLE 0
1798#endif
1799
1800/**
1801 *  RTEMS uses one instance of an internal mutex class.  This accounts
1802 *  for that mutex
1803 */
1804#define CONFIGURE_API_MUTEX_MEMORY \
1805  _Configure_Object_RAM(1, sizeof(API_Mutex_Control))
1806
1807/**
1808 *  This defines the memory used by the thread ready chains.  There is
1809 *  one chain per priority.
1810 */
1811#define CONFIGURE_MEMORY_FOR_THREAD_READY_CHAINS \
1812    _Configure_From_workspace( \
1813        ((CONFIGURE_MAXIMUM_PRIORITY+1) * sizeof(Chain_Control)) )
1814/**
1815 *  This defines the amount of memory reserved for the IDLE task
1816 *  control structures and stack.
1817 */
1818#define CONFIGURE_MEMORY_FOR_IDLE_TASK \
1819    (CONFIGURE_MEMORY_FOR_TASKS(1, 0) + \
1820     (CONFIGURE_IDLE_TASK_STACK_SIZE - CONFIGURE_MINIMUM_TASK_STACK_SIZE))
1821
1822/**
1823 *  This macro accounts for general RTEMS system overhead.
1824 */
1825#define CONFIGURE_MEMORY_FOR_SYSTEM_OVERHEAD \
1826  ( CONFIGURE_MEMORY_FOR_IDLE_TASK +                /* IDLE and stack */ \
1827    CONFIGURE_MEMORY_FOR_THREAD_READY_CHAINS +     /* Ready chains */ \
1828    CONFIGURE_INTERRUPT_VECTOR_TABLE +             /* interrupt vectors */ \
1829    CONFIGURE_INTERRUPT_STACK_MEMORY +             /* interrupt stack */ \
1830    CONFIGURE_API_MUTEX_MEMORY                     /* allocation mutex */ \
1831  )
1832
1833/*
1834 *  Now account for any extra memory that initialization tasks or threads
1835 *  may have requested.
1836 */
1837
1838/**
1839 *  This accounts for any extra memory required by the Classic API
1840 *  Initialization Task.
1841 */
1842#if (CONFIGURE_INIT_TASK_STACK_SIZE > CONFIGURE_MINIMUM_TASK_STACK_SIZE)
1843  #define CONFIGURE_INITIALIZATION_THREADS_STACKS_CLASSIC_PART \
1844      (CONFIGURE_INIT_TASK_STACK_SIZE - CONFIGURE_MINIMUM_TASK_STACK_SIZE)
1845#else
1846  #define CONFIGURE_INITIALIZATION_THREADS_STACKS_CLASSIC_PART 0
1847#endif
1848
1849/**
1850 *  This accounts for any extra memory required by the POSIX API
1851 *  Initialization Thread.
1852 */
1853#if defined(RTEMS_POSIX_API) && \
1854    (CONFIGURE_POSIX_INIT_THREAD_STACK_SIZE > CONFIGURE_MINIMUM_TASK_STACK_SIZE)
1855  #define CONFIGURE_INITIALIZATION_THREADS_STACKS_POSIX_PART \
1856    (CONFIGURE_POSIX_INIT_THREAD_STACK_SIZE - CONFIGURE_MINIMUM_TASK_STACK_SIZE)
1857#else
1858  #define CONFIGURE_INITIALIZATION_THREADS_STACKS_POSIX_PART 0
1859#endif
1860
1861/**
1862 *  This accounts for any extra memory required by the ITRON API
1863 *  Initialization Task.
1864 */
1865#if defined(RTEMS_ITRON_API) && \
1866    (CONFIGURE_ITRON_INIT_TASK_STACK_SIZE > CONFIGURE_MINIMUM_TASK_STACK_SIZE)
1867  #define CONFIGURE_INITIALIZATION_THREADS_STACKS_ITRON_PART \
1868      (CONFIGURE_ITRON_INIT_TASK_STACK_SIZE - CONFIGURE_MINIMUM_TASK_STACK_SIZE)
1869#else
1870  #define CONFIGURE_INITIALIZATION_THREADS_STACKS_ITRON_PART 0
1871#endif
1872
1873/**
1874 *  This macro provides a summation of the various initialization task
1875 *  and thread stack requirements.
1876 */
1877#define CONFIGURE_INITIALIZATION_THREADS_STACKS \
1878    (CONFIGURE_INITIALIZATION_THREADS_STACKS_CLASSIC_PART + \
1879    CONFIGURE_INITIALIZATION_THREADS_STACKS_POSIX_PART + \
1880    CONFIGURE_INITIALIZATION_THREADS_STACKS_ITRON_PART)
1881
1882/**
1883 *  This macro provides a summation of the various task and thread
1884 *  requirements.
1885 */
1886#define CONFIGURE_TOTAL_TASKS_AND_THREADS \
1887   (CONFIGURE_MAXIMUM_TASKS + \
1888    CONFIGURE_MAXIMUM_POSIX_THREADS + CONFIGURE_MAXIMUM_ADA_TASKS + \
1889    CONFIGURE_MAXIMUM_ITRON_TASKS \
1890   )
1891
1892/**
1893 *  This macro reserves the memory required by the statically configured
1894 *  user extensions.
1895 */
1896#define CONFIGURE_MEMORY_FOR_STATIC_EXTENSIONS \
1897     ((CONFIGURE_NEWLIB_EXTENSION * \
1898        _Configure_From_workspace( sizeof(User_extensions_Control))) + \
1899      (CONFIGURE_STACK_CHECKER_EXTENSION * \
1900        _Configure_From_workspace( sizeof(User_extensions_Control))) \
1901     )
1902
1903/**
1904 *  This macro provides a summation of the memory required by the
1905 *  Classic API as configured.
1906 */
1907#define CONFIGURE_MEMORY_FOR_CLASSIC \
1908  (CONFIGURE_MEMORY_FOR_TASK_VARIABLES(CONFIGURE_MAXIMUM_TASK_VARIABLES) + \
1909   CONFIGURE_MEMORY_FOR_TIMERS(CONFIGURE_MAXIMUM_TIMERS + \
1910    CONFIGURE_TIMER_FOR_SHARED_MEMORY_DRIVER ) + \
1911   CONFIGURE_MEMORY_FOR_SEMAPHORES(CONFIGURE_SEMAPHORES) + \
1912   CONFIGURE_MEMORY_FOR_MESSAGE_QUEUES(CONFIGURE_MAXIMUM_MESSAGE_QUEUES) + \
1913   CONFIGURE_MEMORY_FOR_PARTITIONS(CONFIGURE_MAXIMUM_PARTITIONS) + \
1914   CONFIGURE_MEMORY_FOR_REGIONS( CONFIGURE_MAXIMUM_REGIONS ) + \
1915   CONFIGURE_MEMORY_FOR_PORTS(CONFIGURE_MAXIMUM_PORTS) + \
1916   CONFIGURE_MEMORY_FOR_PERIODS(CONFIGURE_MAXIMUM_PERIODS) + \
1917   CONFIGURE_MEMORY_FOR_BARRIERS(CONFIGURE_MAXIMUM_BARRIERS) + \
1918   CONFIGURE_MEMORY_FOR_USER_EXTENSIONS(CONFIGURE_MAXIMUM_USER_EXTENSIONS) \
1919  )
1920
1921#if defined(CONFIGURE_CONFDEFS_DEBUG) && defined(CONFIGURE_INIT)
1922  /**
1923   *  This is a debug mechanism, so if you need to, the executable will
1924   *  have a structure with various partial values.  Add to this as you
1925   *  need to.  Viewing this structure in gdb combined with dumping
1926   *  the Configuration structures generated should help a lot in tracing
1927   *  down errors and analyzing where over and under allocations are.
1928   */
1929  typedef struct {
1930    uint32_t SYSTEM_OVERHEAD;
1931    uint32_t STATIC_EXTENSIONS;
1932    uint32_t INITIALIZATION_THREADS_STACKS;
1933
1934    uint32_t PER_INTEGER_TASK;
1935    uint32_t FP_OVERHEAD;
1936    uint32_t CLASSIC;
1937    uint32_t POSIX;
1938    uint32_t ITRON;
1939
1940    /* System overhead pieces */
1941    uint32_t INTERRUPT_VECTOR_TABLE;
1942    uint32_t INTERRUPT_STACK_MEMORY;
1943    uint32_t THREAD_READY_CHAINS;
1944    uint32_t MEMORY_FOR_IDLE_TASK;
1945
1946    /* Classic API Pieces */
1947    uint32_t CLASSIC_TASKS;
1948    uint32_t TASK_VARIABLES;
1949    uint32_t TIMERS;
1950    uint32_t SEMAPHORES;
1951    uint32_t MESSAGE_QUEUES;
1952    uint32_t PARTITIONS;
1953    uint32_t REGIONS;
1954    uint32_t PORTS;
1955    uint32_t PERIODS;
1956    uint32_t BARRIERS;
1957    uint32_t USER_EXTENSIONS;
1958#ifdef RTEMS_POSIX_API
1959    /* POSIX API Pieces */
1960    uint32_t POSIX_MUTEXES;
1961    uint32_t POSIX_CONDITION_VARIABLES;
1962    uint32_t POSIX_KEYS;
1963    uint32_t POSIX_TIMERS;
1964    uint32_t POSIX_QUEUED_SIGNALS;
1965    uint32_t POSIX_MESSAGE_QUEUES;
1966    uint32_t POSIX_SEMAPHORES;
1967    uint32_t POSIX_BARRIERS;
1968    uint32_t POSIX_SPINLOCKS;
1969    uint32_t POSIX_RWLOCKS;
1970#endif
1971#ifdef RTEMS_ITRON_API
1972    /* ITRON API Pieces */
1973    uint32_t ITRON_SEMAPHORES;
1974    uint32_t ITRON_EVENTFLAGS;
1975    uint32_t ITRON_MAILBOXES;
1976    uint32_t ITRON_MESSAGE_BUFFERS;
1977    uint32_t ITRON_PORTS;
1978    uint32_t ITRON_MEMORY_POOLS;
1979    uint32_t ITRON_FIXED_MEMORY_POOLS;
1980#endif
1981  } Configuration_Debug_t;
1982
1983  Configuration_Debug_t Configuration_Memory_Debug = {
1984    /* General Information */
1985    CONFIGURE_MEMORY_FOR_SYSTEM_OVERHEAD,
1986    CONFIGURE_MEMORY_FOR_STATIC_EXTENSIONS,
1987    CONFIGURE_INITIALIZATION_THREADS_STACKS,
1988    CONFIGURE_MEMORY_FOR_TASKS(1, 0),
1989    CONFIGURE_MEMORY_FOR_TASKS(0, 1),
1990    CONFIGURE_MEMORY_FOR_CLASSIC,
1991    CONFIGURE_MEMORY_FOR_POSIX,
1992    CONFIGURE_MEMORY_FOR_ITRON,
1993
1994    /* System overhead pieces */
1995    CONFIGURE_INTERRUPT_VECTOR_TABLE,
1996    CONFIGURE_INTERRUPT_STACK_MEMORY,
1997    CONFIGURE_MEMORY_FOR_THREAD_READY_CHAINS,
1998    CONFIGURE_MEMORY_FOR_IDLE_TASK,
1999
2000    /* Classic API Pieces */
2001    CONFIGURE_MEMORY_FOR_TASKS(CONFIGURE_MAXIMUM_TASKS, 0),
2002    CONFIGURE_MEMORY_FOR_TASK_VARIABLES(CONFIGURE_MAXIMUM_TASK_VARIABLES),
2003    CONFIGURE_MEMORY_FOR_TIMERS(CONFIGURE_MAXIMUM_TIMERS),
2004    CONFIGURE_MEMORY_FOR_SEMAPHORES(CONFIGURE_SEMAPHORES),
2005    CONFIGURE_MEMORY_FOR_MESSAGE_QUEUES(CONFIGURE_MAXIMUM_MESSAGE_QUEUES),
2006    CONFIGURE_MEMORY_FOR_PARTITIONS(CONFIGURE_MAXIMUM_PARTITIONS),
2007    CONFIGURE_MEMORY_FOR_REGIONS( CONFIGURE_MAXIMUM_REGIONS ),
2008    CONFIGURE_MEMORY_FOR_PORTS(CONFIGURE_MAXIMUM_PORTS),
2009    CONFIGURE_MEMORY_FOR_PERIODS(CONFIGURE_MAXIMUM_PERIODS),
2010    CONFIGURE_MEMORY_FOR_BARRIERS(CONFIGURE_MAXIMUM_BARRIERS),
2011    CONFIGURE_MEMORY_FOR_USER_EXTENSIONS(CONFIGURE_MAXIMUM_USER_EXTENSIONS),
2012
2013#ifdef RTEMS_POSIX_API
2014    /* POSIX API Pieces */
2015    CONFIGURE_MEMORY_FOR_POSIX_MUTEXES( CONFIGURE_MAXIMUM_POSIX_MUTEXES ),
2016    CONFIGURE_MEMORY_FOR_POSIX_CONDITION_VARIABLES(
2017      CONFIGURE_MAXIMUM_POSIX_CONDITION_VARIABLES ),
2018    CONFIGURE_MEMORY_FOR_POSIX_KEYS( CONFIGURE_MAXIMUM_POSIX_KEYS ),
2019    CONFIGURE_MEMORY_FOR_POSIX_QUEUED_SIGNALS(
2020      CONFIGURE_MAXIMUM_POSIX_QUEUED_SIGNALS ),
2021    CONFIGURE_MEMORY_FOR_POSIX_MESSAGE_QUEUES(
2022      CONFIGURE_MAXIMUM_POSIX_MESSAGE_QUEUES ),
2023    CONFIGURE_MEMORY_FOR_POSIX_SEMAPHORES( CONFIGURE_MAXIMUM_POSIX_SEMAPHORES ),
2024    CONFIGURE_MEMORY_FOR_POSIX_BARRIERS( CONFIGURE_MAXIMUM_POSIX_BARRIERS ),
2025    CONFIGURE_MEMORY_FOR_POSIX_SPINLOCKS( CONFIGURE_MAXIMUM_POSIX_SPINLOCKS ),
2026    CONFIGURE_MEMORY_FOR_POSIX_RWLOCKS( CONFIGURE_MAXIMUM_POSIX_RWLOCKS ),
2027    CONFIGURE_MEMORY_FOR_POSIX_TIMERS( CONFIGURE_MAXIMUM_POSIX_TIMERS ),
2028#endif
2029
2030#ifdef RTEMS_ITRON_API
2031    /* ITRON API Pieces */
2032    CONFIGURE_MEMORY_FOR_ITRON_SEMAPHORES( CONFIGURE_MAXIMUM_ITRON_SEMAPHORES ),
2033    CONFIGURE_MEMORY_FOR_ITRON_EVENTFLAGS( CONFIGURE_MAXIMUM_ITRON_EVENTFLAGS ),
2034    CONFIGURE_MEMORY_FOR_ITRON_MAILBOXES( CONFIGURE_MAXIMUM_ITRON_MAILBOXES ),
2035    CONFIGURE_MEMORY_FOR_ITRON_MESSAGE_BUFFERS(
2036        CONFIGURE_MAXIMUM_ITRON_MESSAGE_BUFFERS ),
2037    CONFIGURE_MEMORY_FOR_ITRON_PORTS( CONFIGURE_MAXIMUM_ITRON_PORTS ),
2038    CONFIGURE_MEMORY_FOR_ITRON_MEMORY_POOLS(
2039        CONFIGURE_MAXIMUM_ITRON_MEMORY_POOLS ),
2040    CONFIGURE_MEMORY_FOR_ITRON_FIXED_MEMORY_POOLS(
2041        CONFIGURE_MAXIMUM_ITRON_FIXED_MEMORY_POOLS ),
2042#endif
2043  };
2044#endif
2045
2046/**
2047 *  This calculates the memory required for the executive workspace.
2048 */
2049#define CONFIGURE_EXECUTIVE_RAM_SIZE \
2050(( \
2051   CONFIGURE_MEMORY_FOR_SYSTEM_OVERHEAD + \
2052   CONFIGURE_MEMORY_FOR_DEVFS + \
2053   CONFIGURE_MEMORY_FOR_TASKS( \
2054     CONFIGURE_TOTAL_TASKS_AND_THREADS, CONFIGURE_TOTAL_TASKS_AND_THREADS) + \
2055   CONFIGURE_MEMORY_FOR_CLASSIC + \
2056   CONFIGURE_MEMORY_FOR_POSIX + \
2057   (CONFIGURE_MAXIMUM_POSIX_THREADS * CONFIGURE_MINIMUM_TASK_STACK_SIZE ) + \
2058   CONFIGURE_MEMORY_FOR_ITRON + \
2059   CONFIGURE_INITIALIZATION_THREADS_STACKS + \
2060   CONFIGURE_MEMORY_FOR_STATIC_EXTENSIONS + \
2061   CONFIGURE_MEMORY_FOR_MP + \
2062   CONFIGURE_MESSAGE_BUFFER_MEMORY + \
2063   (CONFIGURE_MEMORY_OVERHEAD * 1024) + \
2064   (CONFIGURE_EXTRA_TASK_STACKS) + (CONFIGURE_ADA_TASKS_STACK) \
2065) & ~0x7)
2066#endif
2067
2068#ifdef CONFIGURE_INIT
2069  /**
2070   *  This is the Classic API Configuration Table.
2071   */
2072  rtems_api_configuration_table Configuration_RTEMS_API = {
2073    CONFIGURE_MAXIMUM_TASKS,
2074    CONFIGURE_NOTEPADS_ENABLED,
2075    CONFIGURE_MAXIMUM_TIMERS + CONFIGURE_TIMER_FOR_SHARED_MEMORY_DRIVER,
2076    CONFIGURE_SEMAPHORES,
2077    CONFIGURE_MAXIMUM_MESSAGE_QUEUES,
2078    CONFIGURE_MAXIMUM_PARTITIONS,
2079    CONFIGURE_MAXIMUM_REGIONS,
2080    CONFIGURE_MAXIMUM_PORTS,
2081    CONFIGURE_MAXIMUM_PERIODS,
2082    CONFIGURE_MAXIMUM_BARRIERS,
2083    CONFIGURE_INIT_TASK_TABLE_SIZE,
2084    CONFIGURE_INIT_TASK_TABLE
2085  };
2086
2087  #ifdef RTEMS_POSIX_API
2088    /**
2089     *  This is the POSIX API Configuration Table.
2090     */
2091    posix_api_configuration_table Configuration_POSIX_API = {
2092      CONFIGURE_MAXIMUM_POSIX_THREADS + CONFIGURE_MAXIMUM_ADA_TASKS,
2093      CONFIGURE_MAXIMUM_POSIX_MUTEXES + CONFIGURE_GNAT_MUTEXES +
2094        CONFIGURE_MAXIMUM_ADA_TASKS + CONFIGURE_MAXIMUM_FAKE_ADA_TASKS,
2095      CONFIGURE_MAXIMUM_POSIX_CONDITION_VARIABLES +
2096        CONFIGURE_MAXIMUM_ADA_TASKS + CONFIGURE_MAXIMUM_FAKE_ADA_TASKS,
2097      CONFIGURE_MAXIMUM_POSIX_KEYS,
2098      CONFIGURE_MAXIMUM_POSIX_TIMERS,
2099      CONFIGURE_MAXIMUM_POSIX_QUEUED_SIGNALS,
2100      CONFIGURE_MAXIMUM_POSIX_MESSAGE_QUEUES,
2101      CONFIGURE_MAXIMUM_POSIX_MESSAGE_QUEUE_DESCRIPTORS,
2102      CONFIGURE_MAXIMUM_POSIX_SEMAPHORES,
2103      CONFIGURE_MAXIMUM_POSIX_BARRIERS,
2104      CONFIGURE_MAXIMUM_POSIX_RWLOCKS,
2105      CONFIGURE_MAXIMUM_POSIX_SPINLOCKS,
2106      CONFIGURE_POSIX_INIT_THREAD_TABLE_SIZE,
2107      CONFIGURE_POSIX_INIT_THREAD_TABLE_NAME
2108    };
2109  #endif
2110
2111  #ifdef RTEMS_ITRON_API
2112    /**
2113     *  This is the ITRON API Configuration Table.
2114     */
2115    itron_api_configuration_table Configuration_ITRON_API = {
2116      CONFIGURE_MAXIMUM_ITRON_TASKS,
2117      CONFIGURE_MAXIMUM_ITRON_SEMAPHORES,
2118      CONFIGURE_MAXIMUM_ITRON_EVENTFLAGS,
2119      CONFIGURE_MAXIMUM_ITRON_MAILBOXES,
2120      CONFIGURE_MAXIMUM_ITRON_MESSAGE_BUFFERS,
2121      CONFIGURE_MAXIMUM_ITRON_PORTS,
2122      CONFIGURE_MAXIMUM_ITRON_MEMORY_POOLS,
2123      CONFIGURE_MAXIMUM_ITRON_FIXED_MEMORY_POOLS,
2124      CONFIGURE_ITRON_INIT_TASK_TABLE_SIZE,
2125      CONFIGURE_ITRON_INIT_TASK_TABLE_NAME
2126    };
2127  #endif
2128
2129  /** This variable specifies the minimum stack size for tasks in an RTEMS
2130   *  application.
2131   *
2132   *  @note This is left as a simple uint32_t so it can be externed as
2133   *        needed without requring being high enough logical to
2134   *        include the full configuration table.
2135   */
2136  uint32_t rtems_minimum_stack_size =
2137    CONFIGURE_MINIMUM_TASK_STACK_SIZE;
2138
2139  /** This variable specifies the maximum priority value that
2140   *  a task may have.  This must be a power of 2 between 4
2141   *  and 256 and is specified in terms of Classic API
2142   *  priority values.
2143   *
2144   *  @note This is left as a simple uint8_t so it can be externed as
2145   *        needed without requring being high enough logical to
2146   *        include the full configuration table.
2147   */
2148  uint8_t rtems_maximum_priority = CONFIGURE_MAXIMUM_PRIORITY;
2149
2150  /**
2151   *  This is the primary Configuration Table for this application.
2152   */
2153  rtems_configuration_table Configuration = {
2154    NULL,                                     /* filled in by BSP */
2155    CONFIGURE_EXECUTIVE_RAM_SIZE,             /* required RTEMS workspace */
2156    CONFIGURE_MAXIMUM_USER_EXTENSIONS,        /* maximum dynamic extensions */
2157    CONFIGURE_MICROSECONDS_PER_TICK,          /* microseconds per clock tick */
2158    CONFIGURE_TICKS_PER_TIMESLICE,            /* ticks per timeslice quantum */
2159    CONFIGURE_IDLE_TASK_BODY,                 /* user's IDLE task */
2160    CONFIGURE_IDLE_TASK_STACK_SIZE,           /* IDLE task stack size */
2161    CONFIGURE_INTERRUPT_STACK_SIZE,           /* interrupt stack size */
2162    CONFIGURE_TASK_STACK_ALLOCATOR,           /* stack allocator */
2163    CONFIGURE_TASK_STACK_DEALLOCATOR,         /* stack deallocator */
2164    CONFIGURE_ZERO_WORKSPACE_AUTOMATICALLY,   /* true to clear memory */
2165    CONFIGURE_MAXIMUM_DRIVERS,                /* maximum device drivers */
2166    CONFIGURE_NUMBER_OF_DRIVERS,              /* static device drivers */
2167    Device_drivers,                           /* pointer to driver table */
2168    CONFIGURE_NUMBER_OF_INITIAL_EXTENSIONS,   /* number of static extensions */
2169    CONFIGURE_INITIAL_EXTENSION_TABLE,        /* pointer to static extensions */
2170    #if defined(RTEMS_MULTIPROCESSING)
2171      CONFIGURE_MULTIPROCESSING_TABLE,        /* pointer to MP config table */
2172    #endif
2173  };
2174#endif
2175
2176#endif /* CONFIGURE_HAS_OWN_CONFIGURATION_TABLE */
2177
2178/*
2179 *  If the user has configured a set of Classic API Initialization Tasks,
2180 *  then we need to install the code that runs that loop.
2181 */
2182#ifdef CONFIGURE_INIT
2183  #if defined(CONFIGURE_RTEMS_INIT_TASKS_TABLE) || \
2184      defined(CONFIGURE_HAS_OWN_INIT_TASK_TABLE)
2185    void (_RTEMS_tasks_Initialize_user_tasks_body)(void);
2186    void (*_RTEMS_tasks_Initialize_user_tasks_p)(void) =
2187              _RTEMS_tasks_Initialize_user_tasks_body;
2188  #else
2189    void (*_RTEMS_tasks_Initialize_user_tasks_p)(void) = NULL;
2190  #endif
2191#endif
2192
2193/*
2194 *  If the user has configured a set of POSIX Initialization Threads,
2195 *  then we need to install the code that runs that loop.
2196 */
2197#ifdef RTEMS_POSIX_API
2198  #ifdef CONFIGURE_INIT
2199    #if defined(CONFIGURE_POSIX_INIT_THREAD_TABLE) || \
2200        defined(CONFIGURE_POSIX_HAS_OWN_INIT_THREAD_TABLE)
2201      void _POSIX_Threads_Initialize_user_threads_body(void);
2202      void (*_POSIX_Threads_Initialize_user_threads_p)(void) =
2203                _POSIX_Threads_Initialize_user_threads_body;
2204    #else
2205      void (*_POSIX_Threads_Initialize_user_threads_p)(void) = NULL;
2206    #endif
2207  #endif
2208#endif
2209
2210/*
2211 *  If the user has configured a set of ITRON Initialization Tasks,
2212 *  then we need to install the code that runs that loop.
2213 */
2214#ifdef RTEMS_ITRON_API
2215  #ifdef CONFIGURE_INIT
2216    #if defined(CONFIGURE_ITRON_INIT_TASK_TABLE) || \
2217        defined(CONFIGURE_ITRON_HAS_OWN_INIT_TASK_TABLE)
2218      void _ITRON_Task_Initialize_user_tasks_body(void);
2219      void (*_ITRON_Initialize_user_tasks_p)(void) =
2220                _ITRON_Task_Initialize_user_tasks_body;
2221    #else
2222      void (*_ITRON_Initialize_user_tasks_p)(void) = NULL;
2223    #endif
2224  #endif
2225#endif
2226
2227#ifdef __cplusplus
2228}
2229#endif
2230
2231/******************************************************************
2232 ******************************************************************
2233 ******************************************************************
2234 *         CONFIGURATION WARNINGS AND ERROR CHECKING              *
2235 ******************************************************************
2236 ******************************************************************
2237 ******************************************************************
2238 */
2239
2240/*
2241 *  Make sure a task/thread of some sort is configured.
2242 *
2243 *  When analyzing RTEMS to find the smallest possible of memory
2244 *  that must be allocated, you probably do want to configure 0
2245 *  tasks/threads so there is a smaller set of calls to _Workspace_Allocate
2246 *  to analyze.
2247 */
2248#if !defined(CONFIGURE_IDLE_TASK_INITIALIZES_APPLICATION)
2249  #if (CONFIGURE_MAXIMUM_TASKS == 0) && \
2250      (CONFIGURE_MAXIMUM_POSIX_THREADS == 0) && \
2251      (CONFIGURE_MAXIMUM_ADA_TASKS == 0) &&  \
2252      (CONFIGURE_MAXIMUM_ITRON_TASKS == 0)
2253    #error "CONFIGURATION ERROR: No tasks or threads configured!!"
2254  #endif
2255#endif
2256
2257/*
2258 *  Make sure at least one of the initialization task/thread
2259 *  tables was defined.
2260 */
2261#if !defined(CONFIGURE_RTEMS_INIT_TASKS_TABLE) && \
2262    !defined(CONFIGURE_POSIX_INIT_THREAD_TABLE) && \
2263    !defined(CONFIGURE_ITRON_INIT_TASK_TABLE) && \
2264    !defined(CONFIGURE_IDLE_TASK_INITIALIZES_APPLICATION)
2265#error "CONFIGURATION ERROR: No initialization tasks or threads configured!!"
2266#endif
2267
2268/*
2269 *  If the user is trying to configure a multiprocessing application and
2270 *  RTEMS was not configured and built multiprocessing, then error out.
2271 */
2272#if defined(CONFIGURE_MP_APPLICATION) && \
2273    !defined(RTEMS_MULTIPROCESSING)
2274#error "CONFIGURATION ERROR: RTEMS not configured for multiprocessing!!"
2275#endif
2276
2277/*
2278 *  If an attempt was made to configure POSIX objects and
2279 *  the POSIX API was not configured into RTEMS, error out.
2280 */
2281#if !defined(RTEMS_POSIX_API)
2282  #if ((CONFIGURE_MAXIMUM_POSIX_THREADS != 0) || \
2283       (CONFIGURE_MAXIMUM_POSIX_MUTEXES != 0) || \
2284       (CONFIGURE_MAXIMUM_POSIX_CONDITION_VARIABLES != 0) || \
2285       (CONFIGURE_MAXIMUM_POSIX_KEYS != 0) || \
2286       (CONFIGURE_MAXIMUM_POSIX_TIMERS != 0) || \
2287       (CONFIGURE_MAXIMUM_POSIX_QUEUED_SIGNALS != 0) || \
2288       (CONFIGURE_MAXIMUM_POSIX_MESSAGE_QUEUES != 0) || \
2289       (CONFIGURE_MAXIMUM_POSIX_MESSAGE_QUEUE_DESCRIPTORS != 0) || \
2290       (CONFIGURE_MAXIMUM_POSIX_SEMAPHORES != 0) || \
2291       (CONFIGURE_MAXIMUM_POSIX_BARRIERS != 0) || \
2292       (CONFIGURE_MAXIMUM_POSIX_SPINLOCKS != 0) || \
2293       (CONFIGURE_MAXIMUM_POSIX_RWLOCKS != 0) || \
2294      defined(CONFIGURE_POSIX_INIT_THREAD_TABLE))
2295  #error "CONFIGURATION ERROR: POSIX API support not configured!!"
2296  #endif
2297#endif
2298
2299/*
2300 *  If an attempt was made to configure ITRON objects and
2301 *  the ITRON API was not configured into RTEMS, error out.
2302 */
2303#if !defined(RTEMS_ITRON_API)
2304  #if ((CONFIGURE_MAXIMUM_ITRON_TASKS != 0) || \
2305       (CONFIGURE_MAXIMUM_ITRON_SEMAPHORES != 0) || \
2306       (CONFIGURE_MAXIMUM_ITRON_EVENTFLAGS != 0) || \
2307       (CONFIGURE_MAXIMUM_ITRON_MAILBOXES != 0) || \
2308       (CONFIGURE_MAXIMUM_ITRON_MESSAGE_BUFFERS != 0) || \
2309       (CONFIGURE_MAXIMUM_ITRON_PORTS != 0) || \
2310       (CONFIGURE_MAXIMUM_ITRON_MEMORY_POOLS != 0) || \
2311       (CONFIGURE_MAXIMUM_ITRON_FIXED_MEMORY_POOLS != 0) || \
2312      defined(CONFIGURE_ITRON_INIT_TASK_TABLE))
2313  #error "CONFIGURATION ERROR: ITRON API support not configured!!"
2314  #endif
2315#endif
2316
2317/*
2318 *  You must either explicity include or exclude the clock driver.
2319 *  It is such a common newbie error to leave it out.  Maybe this
2320 *  will put an end to it.
2321 *
2322 *  NOTE: If you are using the timer driver, it is considered
2323 *        mutually exclusive with the clock driver because the
2324 *        drivers are assumed to use the same "timer" hardware
2325 *        on many boards.
2326 */
2327#if !defined(CONFIGURE_HAS_OWN_DEVICE_DRIVER_TABLE)
2328  #if !defined(CONFIGURE_APPLICATION_NEEDS_CLOCK_DRIVER) && \
2329      !defined(CONFIGURE_APPLICATION_DOES_NOT_NEED_CLOCK_DRIVER) && \
2330      !defined(CONFIGURE_APPLICATION_NEEDS_TIMER_DRIVER)
2331    #error "CONFIGURATION ERROR: Do you want the clock driver or not?!?"
2332   #endif
2333#endif
2334
2335/*
2336 *  These names have been obsoleted so make the user application stop compiling
2337 */
2338#if defined(CONFIGURE_TEST_NEEDS_TIMER_DRIVER) || \
2339    defined(CONFIGURE_TEST_NEEDS_CONSOLE_DRIVER) || \
2340    defined(CONFIGURE_TEST_NEEDS_CLOCK_DRIVER) || \
2341    defined(CONFIGURE_TEST_NEEDS_RTC_DRIVER) || \
2342    defined(CONFIGURE_TEST_NEEDS_STUB_DRIVER)
2343#error "CONFIGURATION ERROR: CONFIGURE_TEST_XXX constants are obsolete"
2344#endif
2345
2346/*
2347 *  Validate the configured maximum priority
2348 */
2349#if ((CONFIGURE_MAXIMUM_PRIORITY != 3) && \
2350     (CONFIGURE_MAXIMUM_PRIORITY != 7) && \
2351     (CONFIGURE_MAXIMUM_PRIORITY != 15) && \
2352     (CONFIGURE_MAXIMUM_PRIORITY != 31) && \
2353     (CONFIGURE_MAXIMUM_PRIORITY != 63) && \
2354     (CONFIGURE_MAXIMUM_PRIORITY != 127) && \
2355     (CONFIGURE_MAXIMUM_PRIORITY != 255))
2356  #error "Maximum priority is not 1 less than a power of 2 between 4 and 256"
2357#endif
2358
2359#if (CONFIGURE_MAXIMUM_PRIORITY > PRIORITY_DEFAULT_MAXIMUM)
2360  #error "Maximum priority configured higher than supported by target."
2361#endif
2362
2363/*
2364 *  If you have fewer POSIX Message Queue Descriptors than actual
2365 *  POSIX Message Queues, then you will not be able to open all the
2366 *  queues.
2367 */
2368#if (CONFIGURE_MAXIMUM_POSIX_MESSAGE_QUEUE_DESCRIPTORS < \
2369     CONFIGURE_MAXIMUM_POSIX_MESSAGE_QUEUES)
2370  #error "Fewer POSIX Message Queue descriptors than Queues!"
2371#endif
2372
2373#endif
2374/* end of include file */
Note: See TracBrowser for help on using the repository browser.