source: rtems/cpukit/sapi/include/confdefs.h @ 3d3a18e6

4.10
Last change on this file since 3d3a18e6 was 3d3a18e6, checked in by Sebastian Huber <sebastian.huber@…>, on 07/01/10 at 14:39:39

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

  • libcsupport/src/unmount.c: Removed obsolete declarations. Fixed invalid memory free.

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

  • libnetworking/rtems/ftpfs.h, libnetworking/lib/ftpfs.c: Removed rtems_ftpfs_mount().

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

  • libcsupport/src/mount-mktgt.c: New file.
  • libcsupport/Makefile.am: Reflect change above.
  • libcsupport/include/rtems/libio.h: Declare mount_and_make_target_path().

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

  • libnetworking/rtems/ftpfs.h, libnetworking/lib/ftpfs.c: Added rtems_ftpfs_mount() again. Documentation.

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

  • libcsupport/include/rtems/libio.h, sapi/include/confdefs.h: Added and use defines for file system types.

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

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