source: rtems/cpukit/sapi/include/confdefs.h @ 8f25cec

4.104.114.95
Last change on this file since 8f25cec was 8f25cec, checked in by Chris Johns <chrisj@…>, on 06/19/08 at 05:40:20

2008-06-19 Matthew Riek <matthew.riek@…>

  • sapi/include/confdefs.h: Use the PRIORITY_DEFAULT_MAXIMUM rather than a number.
  • Property mode set to 100644
File size: 65.1 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-2008.
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/**
76 *  This macro defines the number of POSIX file descriptors allocated
77 *  and managed by libio.  These are the "integer" file descriptors that
78 *  are used by calls like open(2) and read(2).
79 */
80#ifndef CONFIGURE_LIBIO_MAXIMUM_FILE_DESCRIPTORS
81  #define CONFIGURE_LIBIO_MAXIMUM_FILE_DESCRIPTORS 3
82#endif
83
84/**
85 *  From the number of file descriptors, we can determine how many
86 *  semaphores the implementation will require.
87 */
88#define CONFIGURE_LIBIO_SEMAPHORES \
89  (CONFIGURE_LIBIO_MAXIMUM_FILE_DESCRIPTORS + 1)
90
91#ifdef CONFIGURE_INIT
92  /**
93   *  When instantiating the configuration tables, this variable is
94   *  initialized to specify the maximum number of file descriptors.
95   */
96  uint32_t rtems_libio_number_iops = CONFIGURE_LIBIO_MAXIMUM_FILE_DESCRIPTORS;
97#endif
98
99/**
100 *  This macro determines if termios is disabled by this application.
101 *  This only means that resources will not be reserved.  If you end
102 *  up using termios, it will fail.
103 */
104#ifdef CONFIGURE_TERMIOS_DISABLED
105  #define CONFIGURE_TERMIOS_SEMAPHORES 0
106#else
107  /**
108   *  This macro specifies the number of serial or PTY ports that will
109   *  use termios.
110   */
111  #ifndef CONFIGURE_NUMBER_OF_TERMIOS_PORTS
112  #define CONFIGURE_NUMBER_OF_TERMIOS_PORTS 1
113  #endif
114
115  /**
116   *  This macro reserves the number of semaphores required by termios
117   *  based upon the number of communication ports that will use it.
118   */
119  #define CONFIGURE_TERMIOS_SEMAPHORES \
120    ((CONFIGURE_NUMBER_OF_TERMIOS_PORTS * 4) + 1)
121#endif
122
123/**
124 *  This macro specifies the number of PTYs that can be concurrently
125 *  active.
126 */
127#ifndef CONFIGURE_MAXIMUM_PTYS
128  #define CONFIGURE_MAXIMUM_PTYS 0
129#endif
130
131/**
132 *  This variable contains the maximum number of PTYs that can be
133 *  concurrently active.
134 */
135#ifdef CONFIGURE_INIT
136  int rtems_telnetd_maximum_ptys = CONFIGURE_MAXIMUM_PTYS;
137#else
138  extern int rtems_telnetd_maximum_ptys;
139#endif
140
141/*
142 *  Mount Table Configuration
143 */
144#include <rtems/imfs.h>
145
146/**
147 *  This specifies the number of bytes per block for files within
148 *  the IMFS.  There are a maximum number of blocks per file so
149 *  this dictates the maximum size of a file.  This has to be balanced
150 *  with the unused portion of each block that might be wasted.
151 */
152#ifndef CONFIGURE_IMFS_MEMFILE_BYTES_PER_BLOCK
153  #define CONFIGURE_IMFS_MEMFILE_BYTES_PER_BLOCK \
154                    IMFS_MEMFILE_DEFAULT_BYTES_PER_BLOCK
155#endif
156#ifdef CONFIGURE_INIT
157  int imfs_rq_memfile_bytes_per_block = CONFIGURE_IMFS_MEMFILE_BYTES_PER_BLOCK;
158#endif /* CONFIGURE_INIT */
159
160#ifdef CONFIGURE_INIT
161  #ifndef CONFIGURE_HAS_OWN_MOUNT_TABLE
162    const rtems_filesystem_mount_table_t configuration_mount_table = {
163      #ifdef CONFIGURE_USE_IMFS_AS_BASE_FILESYSTEM
164        &IMFS_ops,
165      #else  /* using miniIMFS as base filesystem */
166        &miniIMFS_ops,
167      #endif
168      RTEMS_FILESYSTEM_READ_WRITE,
169      NULL,
170      NULL
171    };
172
173    const rtems_filesystem_mount_table_t
174        *rtems_filesystem_mount_table = &configuration_mount_table;
175    const int rtems_filesystem_mount_table_size = 1;
176  #endif
177#endif
178
179/**
180 *  This configures the stack checker user extension.
181 */
182#ifdef STACK_CHECKER_ON
183  #define CONFIGURE_STACK_CHECKER_EXTENSION 1
184#else
185  #define CONFIGURE_STACK_CHECKER_EXTENSION 0
186#endif
187
188/**
189 *  @brief Maximum Priority configuration
190 *
191 *  This configures the maximum priority value that
192 *  a task may have.
193 *
194 *  By reducing the number of priorities in a system,
195 *  the amount of RAM required by RTEMS can be significantly
196 *  reduced.  RTEMS allocates a Chain_Control structure per
197 *  priority and this structure contains 3 pointers.  So
198 *  the default is (256 * 12) = 3K on 32-bit architectures.
199 *
200 *  This must be one less than a power of 2 between
201 *  4 and 256.  Valid values along with the application
202 *  priority levels and memory saved when pointers are
203 *  32-bits in size are:
204 *
205 *    + 3,  2 application priorities, 3024 bytes saved
206 *    + 7, 5 application priorities, 2976 bytes saved
207 *    + 15, 13 application priorities, 2880 bytes saved
208 *    + 31, 29 application priorities, 2688 bytes saved
209 *    + 63, 61 application priorities, 2304 bytes saved
210 *    + 127, 125 application priorities, 1536 bytes saved
211 *    + 255, 253 application priorities, 0 bytes saved
212 *
213 *  It is specified in terms of Classic API
214 *  priority values.
215 */
216#ifndef CONFIGURE_MAXIMUM_PRIORITY
217  #define CONFIGURE_MAXIMUM_PRIORITY PRIORITY_DEFAULT_MAXIMUM
218#endif
219
220/*
221 *  If you said the IDLE task was going to do application initialization
222 *  and didn't override the IDLE body, then something is amiss.
223 */
224#if (defined(CONFIGURE_IDLE_TASK_INITIALIZES_APPLICATION) && \
225     !defined(CONFIGURE_IDLE_TASK_BODY))
226  #error "CONFIGURE_ERROR: You did not override the IDLE task body."
227#endif
228
229/**
230 *  @brief Idle task body configuration
231 *
232 *  There is a default IDLE thread body provided by RTEMS which
233 *  has the possibility of being CPU specific.  There may be a
234 *  BSP specific override of the RTEMS default body and in turn,
235 *  the application may override and provide its own.
236 */
237#ifndef CONFIGURE_IDLE_TASK_BODY
238  #ifdef BSP_IDLE_TASK_BODY
239    #define CONFIGURE_IDLE_TASK_BODY BSP_IDLE_TASK_BODY
240  #else
241    #define CONFIGURE_IDLE_TASK_BODY NULL
242  #endif
243#endif
244
245/**
246 *  By default, use the minimum stack size requested by this port.
247 */
248#ifndef CONFIGURE_MINIMUM_TASK_STACK_SIZE
249  #define CONFIGURE_MINIMUM_TASK_STACK_SIZE CPU_STACK_MINIMUM_SIZE
250#endif
251
252/**
253 *  @brief Idle task stack size configuration
254 *
255 *  By default, the IDLE task will have a stack of minimum size.
256 *  The BSP or application may override this value.
257 */
258#ifndef CONFIGURE_IDLE_TASK_STACK_SIZE
259  #ifdef BSP_IDLE_TASK_STACK_SIZE
260    #define CONFIGURE_IDLE_TASK_STACK_SIZE BSP_IDLE_TASK_STACK_SIZE
261  #else
262    #define CONFIGURE_IDLE_TASK_STACK_SIZE CONFIGURE_MINIMUM_TASK_STACK_SIZE
263  #endif
264#endif
265
266/**
267 *  @brief Interrupt stack size configuration
268 *
269 *  By default, the interrupt stack will be of minimum size.
270 *  The BSP or application may override this value.
271 */
272#ifndef CONFIGURE_INTERRUPT_STACK_SIZE
273  #ifdef BSP_INTERRUPT_STACK_SIZE
274    #define CONFIGURE_INTERRUPT_STACK_SIZE BSP_INTERRUPT_STACK_SIZE
275  #else
276    #define CONFIGURE_INTERRUPT_STACK_SIZE CONFIGURE_MINIMUM_TASK_STACK_SIZE
277  #endif
278#endif
279
280/**
281 *  This reserves memory for the interrupt stack if it is to be allocated
282 *  by RTEMS rather than the BSP.
283 *
284 *  @todo Try to get to the point where all BSPs support allocating the
285 *        memory from the Workspace.
286 */
287#if (CPU_ALLOCATE_INTERRUPT_STACK == 0)
288  #define CONFIGURE_INTERRUPT_STACK_MEMORY 0
289#else
290  #define CONFIGURE_INTERRUPT_STACK_MEMORY CONFIGURE_INTERRUPT_STACK_SIZE
291#endif
292
293/**
294 *  Configure the very much optional task stack allocator
295 */
296#ifndef CONFIGURE_TASK_STACK_ALLOCATOR
297  #define CONFIGURE_TASK_STACK_ALLOCATOR NULL
298#endif
299
300/**
301 *  Configure the very much optional task stack deallocator
302 */
303#ifndef CONFIGURE_TASK_STACK_DEALLOCATOR
304  #define CONFIGURE_TASK_STACK_DEALLOCATOR NULL
305#endif
306
307/**
308 *  Should the RTEMS Workspace and C Program Heap be cleared automatically
309 *  at system start up?
310 */
311#ifndef CONFIGURE_ZERO_WORKSPACE_AUTOMATICALLY
312  #ifdef BSP_ZERO_WORKSPACE_AUTOMATICALLY
313    #define CONFIGURE_ZERO_WORKSPACE_AUTOMATICALLY \
314            BSP_ZERO_WORKSPACE_AUTOMATICALLY
315  #else
316    #define CONFIGURE_ZERO_WORKSPACE_AUTOMATICALLY FALSE
317  #endif
318#endif
319
320/*
321 *  RTEMS Malloc configuration
322 */
323
324#include <rtems/malloc.h>
325
326#ifdef CONFIGURE_INIT
327  /**
328   *  This configures the malloc family statistics to be available.
329   *  By default only function call counts are kept.
330   */
331  rtems_malloc_statistics_functions_t *rtems_malloc_statistics_helpers =
332    #ifndef CONFIGURE_MALLOC_STATISTICS
333      NULL;
334    #else
335      &rtems_malloc_statistics_helpers_table;
336    #endif
337#endif
338
339#ifdef CONFIGURE_INIT
340  /**
341   *  This configures the sbrk() support for the malloc family.
342   *  By default it is assumed that the BSP provides all available
343   *  RAM to the malloc family implementation so sbrk()'ing to get
344   *  more memory would always fail anyway.
345   */
346  rtems_malloc_sbrk_functions_t *rtems_malloc_sbrk_helpers =
347    #ifndef CONFIGURE_MALLOC_BSP_SUPPORTS_SBRK
348      NULL;
349    #else
350      &rtems_malloc_sbrk_helpers_table;
351    #endif
352#endif
353
354#ifdef CONFIGURE_INIT
355  /**
356   *  This configures the malloc family plugin which dirties memory
357   *  allocated.  This is helpful for finding unitialized data structure
358   *  problems.
359   */
360  rtems_malloc_dirtier_t *rtems_malloc_dirty_helper =
361    #if defined(CONFIGURE_MALLOC_DIRTY)
362      rtems_malloc_dirty_memory;
363    #else
364      NULL;
365    #endif
366#endif
367
368/**
369 *  This is a helper macro used in calculations in this file.  It is used
370 *  to noted when an element is allocated from the RTEMS Workspace and adds
371 *  a factor to account for heap overhead plus an alignment factor that
372 *  may be applied.
373 */
374#define _Configure_From_workspace(_size) \
375  ((_size) + (2 * sizeof(uint32_t)) + CPU_ALIGNMENT)
376
377/**
378 *  This macro accounts for how memory for a set of configured objects is
379 *  allocated from the Executive Workspace. 
380 *
381 *  NOTE: It does NOT attempt to address the more complex case of unlimited
382 *        objects.
383 */
384#define _Configure_Object_RAM(_number, _size) \
385  ( _Configure_From_workspace((_number) * (_size)) + \
386    _Configure_From_workspace( \
387      (((_number) + 1) * sizeof(Objects_Control *)) + \
388      (sizeof(void *) + sizeof(uint32_t) + sizeof(Objects_Name *)) \
389    ) \
390  )
391
392/*
393 *  Default User Initialization Task Table.  This table guarantees that
394 *  one user initialization table is defined.
395 */
396
397#ifdef CONFIGURE_RTEMS_INIT_TASKS_TABLE
398
399#ifdef CONFIGURE_HAS_OWN_INIT_TASK_TABLE
400
401/*
402 *  The user is defining their own table information and setting the
403 *  appropriate variables.
404 */
405
406#else
407
408#ifndef CONFIGURE_INIT_TASK_NAME
409  #define CONFIGURE_INIT_TASK_NAME          rtems_build_name('U', 'I', '1', ' ')
410#endif
411
412#ifndef CONFIGURE_INIT_TASK_STACK_SIZE
413  #define CONFIGURE_INIT_TASK_STACK_SIZE    CONFIGURE_MINIMUM_TASK_STACK_SIZE
414#endif
415
416#ifndef CONFIGURE_INIT_TASK_PRIORITY
417  #define CONFIGURE_INIT_TASK_PRIORITY      1
418#endif
419
420#ifndef CONFIGURE_INIT_TASK_ATTRIBUTES
421  #define CONFIGURE_INIT_TASK_ATTRIBUTES    RTEMS_DEFAULT_ATTRIBUTES
422#endif
423
424#ifndef CONFIGURE_INIT_TASK_ENTRY_POINT
425  #define CONFIGURE_INIT_TASK_ENTRY_POINT   Init
426#endif
427
428#ifndef CONFIGURE_INIT_TASK_INITIAL_MODES
429  #define CONFIGURE_INIT_TASK_INITIAL_MODES RTEMS_NO_PREEMPT
430#endif
431
432#ifndef CONFIGURE_INIT_TASK_ARGUMENTS
433  #define CONFIGURE_INIT_TASK_ARGUMENTS     0
434#endif
435
436#ifdef CONFIGURE_INIT
437  rtems_initialization_tasks_table Initialization_tasks[] = {
438    { CONFIGURE_INIT_TASK_NAME,
439      CONFIGURE_INIT_TASK_STACK_SIZE,
440      CONFIGURE_INIT_TASK_PRIORITY,
441      CONFIGURE_INIT_TASK_ATTRIBUTES,
442      CONFIGURE_INIT_TASK_ENTRY_POINT,
443      CONFIGURE_INIT_TASK_INITIAL_MODES,
444      CONFIGURE_INIT_TASK_ARGUMENTS
445    }
446  };
447#endif
448
449#define CONFIGURE_INIT_TASK_TABLE Initialization_tasks
450
451#define CONFIGURE_INIT_TASK_TABLE_SIZE \
452  sizeof(CONFIGURE_INIT_TASK_TABLE) / sizeof(rtems_initialization_tasks_table)
453
454#endif    /* CONFIGURE_HAS_OWN_INIT_TASK_TABLE */
455
456#else     /* CONFIGURE_RTEMS_INIT_TASKS_TABLE */
457
458#define CONFIGURE_INIT_TASK_TABLE      NULL
459#define CONFIGURE_INIT_TASK_TABLE_SIZE 0
460#define CONFIGURE_INIT_TASK_STACK_SIZE 0
461
462#endif
463
464/*
465 *  Default Device Driver Table.  Each driver needed by the test is explicitly
466 *  choosen by that test.  There is always a null driver entry.
467 */
468
469#define NULL_DRIVER_TABLE_ENTRY \
470 { NULL, NULL, NULL, NULL, NULL, NULL }
471
472#ifdef CONFIGURE_APPLICATION_NEEDS_CONSOLE_DRIVER
473  #include <rtems/console.h>
474#endif
475
476#ifdef CONFIGURE_APPLICATION_NEEDS_CLOCK_DRIVER
477  #include <rtems/clockdrv.h>
478#endif
479
480#ifdef CONFIGURE_APPLICATION_NEEDS_TIMER_DRIVER
481  #include <rtems/timerdrv.h>
482#endif
483
484#ifdef CONFIGURE_APPLICATION_NEEDS_RTC_DRIVER
485  #include <rtems/rtc.h>
486#endif
487
488#ifdef CONFIGURE_APPLICATION_NEEDS_WATCHDOG_DRIVER
489  #include <rtems/watchdogdrv.h>
490#endif
491
492#ifdef CONFIGURE_APPLICATION_NEEDS_STUB_DRIVER
493  #include <rtems/devnull.h>
494#endif
495
496#ifdef CONFIGURE_APPLICATION_NEEDS_IDE_DRIVER
497  /* the ide driver needs the ATA driver */
498  #ifndef CONFIGURE_APPLICATION_NEEDS_ATA_DRIVER
499    #define CONFIGURE_APPLICATION_NEEDS_ATA_DRIVER
500  #endif
501  #include <libchip/ide_ctrl.h>
502#endif
503
504#ifdef CONFIGURE_APPLICATION_NEEDS_ATA_DRIVER
505  #include <libchip/ata.h>
506#endif
507
508#ifndef CONFIGURE_HAS_OWN_DEVICE_DRIVER_TABLE
509
510#ifdef CONFIGURE_INIT
511  rtems_driver_address_table Device_drivers[] = {
512    #ifdef CONFIGURE_APPLICATION_NEEDS_CONSOLE_DRIVER
513      CONSOLE_DRIVER_TABLE_ENTRY,
514    #endif
515    #ifdef CONFIGURE_APPLICATION_NEEDS_CLOCK_DRIVER
516      CLOCK_DRIVER_TABLE_ENTRY,
517    #endif
518    #ifdef CONFIGURE_APPLICATION_NEEDS_RTC_DRIVER
519      RTC_DRIVER_TABLE_ENTRY,
520    #endif
521    #ifdef CONFIGURE_APPLICATION_NEEDS_WATCHDOG_DRIVER
522      WATCHDOG_DRIVER_TABLE_ENTRY,
523    #endif
524    #ifdef CONFIGURE_APPLICATION_NEEDS_STUB_DRIVER
525      DEVNULL_DRIVER_TABLE_ENTRY,
526    #endif
527    #ifdef CONFIGURE_APPLICATION_NEEDS_IDE_DRIVER
528      IDE_CONTROLLER_DRIVER_TABLE_ENTRY,
529    #endif
530    #ifdef CONFIGURE_APPLICATION_NEEDS_ATA_DRIVER
531      ATA_DRIVER_TABLE_ENTRY,
532    #endif
533    #ifdef CONFIGURE_APPLICATION_EXTRA_DRIVERS
534      CONFIGURE_APPLICATION_EXTRA_DRIVERS,
535    #endif
536    #ifdef CONFIGURE_APPLICATION_NEEDS_NULL_DRIVER
537      NULL_DRIVER_TABLE_ENTRY
538    #elif !defined(CONFIGURE_APPLICATION_NEEDS_CONSOLE_DRIVER) && \
539        !defined(CONFIGURE_APPLICATION_NEEDS_CLOCK_DRIVER) && \
540        !defined(CONFIGURE_APPLICATION_NEEDS_RTC_DRIVER) && \
541        !defined(CONFIGURE_APPLICATION_NEEDS_STUB_DRIVER) && \
542        !defined(CONFIGURE_APPLICATION_NEEDS_IDE_DRIVER) && \
543        !defined(CONFIGURE_APPLICATION_NEEDS_ATA_DRIVER) && \
544        !defined(CONFIGURE_APPLICATION_EXTRA_DRIVERS)
545      NULL_DRIVER_TABLE_ENTRY
546    #endif
547  };
548#endif
549
550#endif  /* CONFIGURE_HAS_OWN_DEVICE_DRIVER_TABLE */
551
552/*
553 *  Default the number of drivers per node.  This value may be
554 *  overridden by the user.
555 */
556
557#define CONFIGURE_NUMBER_OF_DRIVERS \
558  ((sizeof(Device_drivers) / sizeof(rtems_driver_address_table)))
559
560/**
561 *  This specifies the maximum number of device drivers that
562 *  can be installed in the system at one time.  It must account
563 *  for both the statically and dynamically installed drivers.
564 */
565#ifndef CONFIGURE_MAXIMUM_DRIVERS
566  #define CONFIGURE_MAXIMUM_DRIVERS CONFIGURE_NUMBER_OF_DRIVERS
567#endif
568
569/**
570 *  Default the number of devices per device driver.  This value may be
571 *  overridden by the user.
572 *
573 *  @note This configuration parameter is obsolete. Thus we will warn the
574 *        user that it is obsolete.
575 */
576#ifdef CONFIGURE_MAXIMUM_DEVICES
577  #warning "CONFIGURE_MAXIMUM_DEVICES is obsolete.  Do not use any longer."
578#endif
579
580#ifdef CONFIGURE_APPLICATION_NEEDS_ATA_DRIVER
581  /*
582   * configure the priority of the ATA driver task
583   */
584  #ifndef CONFIGURE_ATA_DRIVER_TASK_PRIORITY
585    #define CONFIGURE_ATA_DRIVER_TASK_PRIORITY ATA_DRIVER_TASK_DEFAULT_PRIORITY
586  #endif
587  #ifdef CONFIGURE_INIT
588    rtems_task_priority ata_driver_task_priority
589      = CONFIGURE_ATA_DRIVER_TASK_PRIORITY;
590  #endif /* CONFIGURE_INIT */
591#endif
592
593/*
594 * add bdbuf configuration and values for swapout task priority
595 */
596#ifdef CONFIGURE_APPLICATION_NEEDS_LIBBLOCK
597  #include <rtems/bdbuf.h>
598  /*
599   * configure the priority of the bdbuf swapout task
600   */
601  #ifndef CONFIGURE_SWAPOUT_TASK_PRIORITY
602    #define CONFIGURE_SWAPOUT_TASK_PRIORITY SWAPOUT_TASK_DEFAULT_PRIORITY
603  #endif
604  #ifdef CONFIGURE_INIT
605    rtems_task_priority swapout_task_priority = CONFIGURE_SWAPOUT_TASK_PRIORITY;
606  #endif
607  #ifndef CONFIGURE_HAS_OWN_BDBUF_TABLE
608    #ifndef CONFIGURE_BDBUF_BUFFER_COUNT
609      #define CONFIGURE_BDBUF_BUFFER_COUNT 64
610    #endif
611
612    #ifndef CONFIGURE_BDBUF_BUFFER_SIZE
613      #define CONFIGURE_BDBUF_BUFFER_SIZE 512
614    #endif
615    #ifdef CONFIGURE_INIT
616      rtems_bdbuf_config rtems_bdbuf_configuration[] = {
617        {CONFIGURE_BDBUF_BUFFER_SIZE, CONFIGURE_BDBUF_BUFFER_COUNT, NULL}
618      };
619      int rtems_bdbuf_configuration_size =( sizeof(rtems_bdbuf_configuration)
620                                 /sizeof(rtems_bdbuf_configuration[0]));
621    #endif /* CONFIGURE_INIT */
622  #endif /* CONFIGURE_HAS_OWN_BDBUF_TABLE        */
623#endif /* CONFIGURE_APPLICATION_NEEDS_LIBBLOCK */
624
625#if defined(RTEMS_MULTIPROCESSING)
626  /*
627   *  Default Multiprocessing Configuration Table.  The defaults are
628   *  appropriate for most of the RTEMS Multiprocessor Test Suite.  Each
629   *  value may be overridden within each test to customize the environment.
630   */
631
632  #ifdef CONFIGURE_MP_APPLICATION
633    #ifndef CONFIGURE_HAS_OWN_MULTIPROCESSING_TABLE
634
635      #ifndef CONFIGURE_MP_NODE_NUMBER
636        #define CONFIGURE_MP_NODE_NUMBER                NODE_NUMBER
637      #endif
638
639      #ifndef CONFIGURE_MP_MAXIMUM_NODES
640        #define CONFIGURE_MP_MAXIMUM_NODES              2
641      #endif
642
643      #ifndef CONFIGURE_MP_MAXIMUM_GLOBAL_OBJECTS
644        #define CONFIGURE_MP_MAXIMUM_GLOBAL_OBJECTS     32
645      #endif
646      #define CONFIGURE_MEMORY_FOR_GLOBAL_OBJECTS(_global_objects) \
647        _Configure_Object_RAM((_global_objects), sizeof(Objects_MP_Control))
648
649      #ifndef CONFIGURE_MP_MAXIMUM_PROXIES
650        #define CONFIGURE_MP_MAXIMUM_PROXIES            32
651      #endif
652      #define CONFIGURE_MEMORY_FOR_PROXIES(_proxies) \
653        _Configure_Object_RAM((_proxies) + 1, sizeof(Thread_Proxy_control) )
654
655      #ifndef CONFIGURE_EXTRA_MPCI_RECEIVE_SERVER_STACK
656        #define CONFIGURE_EXTRA_MPCI_RECEIVE_SERVER_STACK 0
657      #endif
658
659      #ifndef CONFIGURE_MP_MPCI_TABLE_POINTER
660        #include <mpci.h>
661        #define CONFIGURE_MP_MPCI_TABLE_POINTER         &MPCI_table
662      #endif
663
664      #ifdef CONFIGURE_INIT
665        rtems_multiprocessing_table Multiprocessing_configuration = {
666          CONFIGURE_MP_NODE_NUMBER,               /* local node number */
667          CONFIGURE_MP_MAXIMUM_NODES,             /* maximum # nodes */
668          CONFIGURE_MP_MAXIMUM_GLOBAL_OBJECTS,    /* maximum # global objects */
669          CONFIGURE_MP_MAXIMUM_PROXIES,           /* maximum # proxies */
670          CONFIGURE_EXTRA_MPCI_RECEIVE_SERVER_STACK, /* MPCI stack > minimum */
671          CONFIGURE_MP_MPCI_TABLE_POINTER         /* ptr to MPCI config table */
672        };
673      #endif
674
675      #define CONFIGURE_MULTIPROCESSING_TABLE    &Multiprocessing_configuration
676
677    #endif /* CONFIGURE_HAS_OWN_MULTIPROCESSING_TABLE */
678
679  #else
680
681    #define CONFIGURE_MULTIPROCESSING_TABLE    NULL
682
683  #endif /* CONFIGURE_MP_APPLICATION */
684#endif /* RTEMS_MULTIPROCESSING */
685
686/*
687 *  Default Configuration Table.
688 */
689
690#ifndef CONFIGURE_HAS_OWN_CONFIGURATION_TABLE
691
692  #ifndef CONFIGURE_EXECUTIVE_RAM_WORK_AREA
693    #define CONFIGURE_EXECUTIVE_RAM_WORK_AREA     NULL
694  #endif
695
696  #ifndef CONFIGURE_MAXIMUM_TASKS
697    #define CONFIGURE_MAXIMUM_TASKS               0
698  #endif
699
700  #ifndef CONFIGURE_DISABLE_CLASSIC_API_NOTEPADS
701    #define CONFIGURE_NOTEPADS_ENABLED           TRUE
702  #else
703    #define CONFIGURE_NOTEPADS_ENABLED           FALSE
704  #endif
705
706  #ifndef CONFIGURE_DISABLE_CLASSIC_NOTEPADS
707    #define CONFIGURE_MEMORY_PER_TASK_FOR_CLASSIC_API \
708      sizeof(RTEMS_API_Control)
709  #else
710    #define CONFIGURE_MEMORY_PER_TASK_FOR_CLASSIC_API \
711      (sizeof(RTEMS_API_Control) - (RTEMS_NUMBER_NOTEPADS * sizeof(uint32_t)))
712  #endif
713
714  /**
715   *  This macro calculates the memory required for task variables.
716   *
717   *  @note Each task variable is individually allocated from the Workspace.
718   *        Hence, we do the multiplication on the configured size.
719   */
720  #ifndef CONFIGURE_MAXIMUM_TASK_VARIABLES
721    #define CONFIGURE_MAXIMUM_TASK_VARIABLES                     0
722    #define CONFIGURE_MEMORY_FOR_TASK_VARIABLES(_task_variables) 0
723  #else
724    #define CONFIGURE_MEMORY_FOR_TASK_VARIABLES(_task_variables) \
725      (_task_variables) * \
726         _Configure_From_workspace(sizeof(rtems_task_variable_t))
727  #endif
728
729  #ifndef CONFIGURE_MAXIMUM_TIMERS
730    #define CONFIGURE_MAXIMUM_TIMERS             0
731    #define CONFIGURE_MEMORY_FOR_TIMERS(_timers) 0
732  #else
733    #define CONFIGURE_MEMORY_FOR_TIMERS(_timers) \
734      _Configure_Object_RAM(_timers, sizeof(Timer_Control) )
735  #endif
736
737  #ifndef CONFIGURE_MAXIMUM_SEMAPHORES
738    #define CONFIGURE_MAXIMUM_SEMAPHORES                 0
739  #else
740  #endif
741
742  /*
743   * If there are no user or support semaphores defined, then we can assume
744   * that no memory need be allocated at all for semaphores.
745   */
746  #if  ((CONFIGURE_MAXIMUM_SEMAPHORES == 0) && \
747        (CONFIGURE_LIBIO_SEMAPHORES == 0) && \
748        (CONFIGURE_TERMIOS_SEMAPHORES == 0))
749    #define CONFIGURE_MEMORY_FOR_SEMAPHORES(_semaphores) 0
750  #else
751    #define CONFIGURE_MEMORY_FOR_SEMAPHORES(_semaphores) \
752      _Configure_Object_RAM(_semaphores, sizeof(Semaphore_Control) )
753  #endif
754
755  #ifndef CONFIGURE_MAXIMUM_MESSAGE_QUEUES
756    #define CONFIGURE_MAXIMUM_MESSAGE_QUEUES             0
757    #define CONFIGURE_MEMORY_FOR_MESSAGE_QUEUES(_queues) 0
758  #else
759    #define CONFIGURE_MEMORY_FOR_MESSAGE_QUEUES(_queues) \
760      _Configure_Object_RAM(_queues, sizeof(Message_queue_Control) )
761  #endif
762
763  #ifndef CONFIGURE_MAXIMUM_PARTITIONS
764    #define CONFIGURE_MAXIMUM_PARTITIONS                 0
765    #define CONFIGURE_MEMORY_FOR_PARTITIONS(_partitions) 0
766  #else
767    #define CONFIGURE_MEMORY_FOR_PARTITIONS(_partitions) \
768      _Configure_Object_RAM(_partitions, sizeof(Partition_Control) )
769  #endif
770
771  #ifndef CONFIGURE_MAXIMUM_REGIONS
772    #define CONFIGURE_MAXIMUM_REGIONS              0
773    #define CONFIGURE_MEMORY_FOR_REGIONS(_regions) 0
774  #else
775    #define CONFIGURE_MEMORY_FOR_REGIONS(_regions) \
776      _Configure_Object_RAM(_regions, sizeof(Region_Control) )
777  #endif
778
779  #ifndef CONFIGURE_MAXIMUM_PORTS
780    #define CONFIGURE_MAXIMUM_PORTS            0
781    #define CONFIGURE_MEMORY_FOR_PORTS(_ports) 0
782  #else
783    #define CONFIGURE_MEMORY_FOR_PORTS(_ports) \
784      _Configure_Object_RAM(_ports, sizeof(Dual_ported_memory_Control) )
785  #endif
786
787  #ifndef CONFIGURE_MAXIMUM_PERIODS
788    #define CONFIGURE_MAXIMUM_PERIODS              0
789    #define CONFIGURE_MEMORY_FOR_PERIODS(_periods) 0
790  #else
791    #define CONFIGURE_MEMORY_FOR_PERIODS(_periods) \
792      _Configure_Object_RAM(_periods, sizeof(Rate_monotonic_Control) )
793  #endif
794
795  #ifndef CONFIGURE_MAXIMUM_BARRIERS
796    #define CONFIGURE_MAXIMUM_BARRIERS               0
797    #define CONFIGURE_MEMORY_FOR_BARRIERS(_barriers) 0
798  #else
799    #define CONFIGURE_MEMORY_FOR_BARRIERS(_barriers) \
800      _Configure_Object_RAM(_barriers, sizeof(Barrier_Control) )
801  #endif
802
803  #ifndef CONFIGURE_MAXIMUM_USER_EXTENSIONS
804    #define CONFIGURE_MAXIMUM_USER_EXTENSIONS                 0
805    #define CONFIGURE_MEMORY_FOR_USER_EXTENSIONS(_extensions) 0
806  #else
807    #define CONFIGURE_MEMORY_FOR_USER_EXTENSIONS(_extensions) \
808      _Configure_Object_RAM(_extensions, sizeof(Extension_Control) )
809  #endif
810
811  #ifndef CONFIGURE_MICROSECONDS_PER_TICK
812    #define CONFIGURE_MICROSECONDS_PER_TICK \
813            RTEMS_MILLISECONDS_TO_MICROSECONDS(10)
814  #endif
815
816  #ifndef CONFIGURE_TICKS_PER_TIMESLICE
817    #define CONFIGURE_TICKS_PER_TIMESLICE        50
818  #endif
819
820  #ifndef CONFIGURE_DISABLE_CLASSIC_NOTEPADS
821    #define CONFIGURE_MEMORY_PER_TASK_FOR_CLASSIC_API \
822      sizeof(RTEMS_API_Control)
823  #else
824    #define CONFIGURE_MEMORY_PER_TASK_FOR_CLASSIC_API \
825      (sizeof(RTEMS_API_Control) - (RTEMS_NUMBER_NOTEPADS * sizeof(uint32_t)))
826  #endif
827
828/*
829 *  Initial Extension Set
830 */
831
832#ifdef CONFIGURE_INIT
833#ifdef STACK_CHECKER_ON
834#include <rtems/stackchk.h>
835#endif
836#include <rtems/libcsupport.h>
837
838#if defined(CONFIGURE_INITIAL_EXTENSIONS) || \
839    defined(STACK_CHECKER_ON) || \
840    (defined(RTEMS_NEWLIB) && !defined(CONFIGURE_DISABLE_NEWLIB_REENTRANCY))
841  rtems_extensions_table Configuration_Initial_Extensions[] = {
842    #if !defined(CONFIGURE_DISABLE_NEWLIB_REENTRANCY)
843      RTEMS_NEWLIB_EXTENSION,
844    #endif
845    #if defined(STACK_CHECKER_ON)
846      RTEMS_STACK_CHECKER_EXTENSION,
847    #endif
848    #if defined(CONFIGURE_INITIAL_EXTENSIONS)
849      CONFIGURE_INITIAL_EXTENSIONS,
850    #endif
851  };
852
853  #define CONFIGURE_INITIAL_EXTENSION_TABLE Configuration_Initial_Extensions
854  #define CONFIGURE_NUMBER_OF_INITIAL_EXTENSIONS \
855    ((sizeof(Configuration_Initial_Extensions) / \
856      sizeof(rtems_extensions_table)))
857#else
858  #define CONFIGURE_INITIAL_EXTENSION_TABLE NULL
859  #define CONFIGURE_NUMBER_OF_INITIAL_EXTENSIONS 0
860#endif
861
862
863#endif
864
865/*
866 *  POSIX API Configuration Parameters
867 */
868
869#ifdef RTEMS_POSIX_API
870
871  #include <sys/types.h>
872  #include <signal.h>
873  #include <limits.h>
874  #include <mqueue.h>
875  #include <rtems/posix/barrier.h>
876  #include <rtems/posix/cond.h>
877  #include <rtems/posix/mqueue.h>
878  #include <rtems/posix/mutex.h>
879  #include <rtems/posix/key.h>
880  #include <rtems/posix/psignal.h>
881  #include <rtems/posix/rwlock.h>
882  #include <rtems/posix/semaphore.h>
883  #include <rtems/posix/spinlock.h>
884  #include <rtems/posix/threadsup.h>
885  #include <rtems/posix/timer.h>
886
887  /**
888   *  Account for the object control structures plus the name
889   *  of the object to be duplicated.
890   */
891  #define _Configure_POSIX_Named_Object_RAM(_number, _size) \
892    _Configure_Object_RAM( (_number), _size ) + \
893    ((_number) + _Configure_From_workspace(NAME_MAX) )
894
895  #ifndef CONFIGURE_MAXIMUM_POSIX_THREADS
896    #define CONFIGURE_MAXIMUM_POSIX_THREADS      0
897  #endif
898
899  #define CONFIGURE_MEMORY_PER_TASK_FOR_POSIX_API \
900    _Configure_From_workspace( \
901      sizeof (POSIX_API_Control) + \
902     (sizeof (void *) * (CONFIGURE_MAXIMUM_POSIX_KEYS)) \
903    )
904
905  #ifndef CONFIGURE_MAXIMUM_POSIX_MUTEXES
906    #define CONFIGURE_MAXIMUM_POSIX_MUTEXES              0
907    #define CONFIGURE_MEMORY_FOR_POSIX_MUTEXES(_mutexes) 0
908  #else
909    #define CONFIGURE_MEMORY_FOR_POSIX_MUTEXES(_mutexes) \
910      _Configure_Object_RAM(_mutexes, sizeof(POSIX_Mutex_Control) )
911  #endif
912
913  #ifndef CONFIGURE_MAXIMUM_POSIX_CONDITION_VARIABLES
914    #define CONFIGURE_MAXIMUM_POSIX_CONDITION_VARIABLES               0
915    #define CONFIGURE_MEMORY_FOR_POSIX_CONDITION_VARIABLES(_condvars) 0
916  #else
917    #define CONFIGURE_MEMORY_FOR_POSIX_CONDITION_VARIABLES(_condvars) \
918        _Configure_Object_RAM(_condvars, \
919                            sizeof(POSIX_Condition_variables_Control) )
920  #endif
921
922  #ifndef CONFIGURE_MAXIMUM_POSIX_KEYS
923    #define CONFIGURE_MAXIMUM_POSIX_KEYS           0
924    #define CONFIGURE_MEMORY_FOR_POSIX_KEYS(_keys) 0
925  #else
926    #define CONFIGURE_MEMORY_FOR_POSIX_KEYS(_keys) \
927      _Configure_Object_RAM(_keys, sizeof(POSIX_Keys_Control) )
928  #endif
929
930  #ifndef CONFIGURE_MAXIMUM_POSIX_TIMERS
931    #define CONFIGURE_MAXIMUM_POSIX_TIMERS             0
932    #define CONFIGURE_MEMORY_FOR_POSIX_TIMERS(_timers) 0
933  #else
934    #define CONFIGURE_MEMORY_FOR_POSIX_TIMERS(_timers) \
935      _Configure_Object_RAM(_timers, sizeof(POSIX_Timer_Control) )
936  #endif
937
938  #ifndef CONFIGURE_MAXIMUM_POSIX_QUEUED_SIGNALS
939    #define CONFIGURE_MAXIMUM_POSIX_QUEUED_SIGNALS                     0
940    #define CONFIGURE_MEMORY_FOR_POSIX_QUEUED_SIGNALS(_queued_signals) 0
941  #else
942    #define CONFIGURE_MEMORY_FOR_POSIX_QUEUED_SIGNALS(_queued_signals) \
943      _Configure_From_workspace( \
944        (_queued_signals) * (sizeof(POSIX_signals_Siginfo_node)) )
945  #endif
946
947  #ifndef CONFIGURE_MAXIMUM_POSIX_MESSAGE_QUEUES
948    #define CONFIGURE_MAXIMUM_POSIX_MESSAGE_QUEUES                     0
949    #define CONFIGURE_MEMORY_FOR_POSIX_MESSAGE_QUEUES(_message_queues) 0
950  #else
951    #define CONFIGURE_MEMORY_FOR_POSIX_MESSAGE_QUEUES(_message_queues) \
952      _Configure_POSIX_Named_Object_RAM( \
953         _message_queues, sizeof(POSIX_Message_queue_Control) )
954  #endif
955
956  #ifndef CONFIGURE_MAXIMUM_POSIX_SEMAPHORES
957    #define CONFIGURE_MAXIMUM_POSIX_SEMAPHORES                 0
958    #define CONFIGURE_MEMORY_FOR_POSIX_SEMAPHORES(_semaphores) 0
959  #else
960    #define CONFIGURE_MEMORY_FOR_POSIX_SEMAPHORES(_semaphores) \
961      _Configure_POSIX_Named_Object_RAM( \
962         _semaphores, sizeof(POSIX_Semaphore_Control) )
963  #endif
964
965  #ifndef CONFIGURE_MAXIMUM_POSIX_BARRIERS
966    #define CONFIGURE_MAXIMUM_POSIX_BARRIERS               0
967    #define CONFIGURE_MEMORY_FOR_POSIX_BARRIERS(_barriers) 0
968  #else
969    #define CONFIGURE_MEMORY_FOR_POSIX_BARRIERS(_barriers) \
970      _Configure_Object_RAM(_barriers, sizeof(POSIX_Barrier_Control) )
971  #endif
972
973  #ifndef CONFIGURE_MAXIMUM_POSIX_SPINLOCKS
974    #define CONFIGURE_MAXIMUM_POSIX_SPINLOCKS                0
975    #define CONFIGURE_MEMORY_FOR_POSIX_SPINLOCKS(_spinlocks) 0
976  #else
977    #define CONFIGURE_MEMORY_FOR_POSIX_SPINLOCKS(_spinlocks) \
978      _Configure_Object_RAM(_spinlocks, sizeof(POSIX_Spinlock_Control) )
979  #endif
980
981  #ifndef CONFIGURE_MAXIMUM_POSIX_RWLOCKS
982    #define CONFIGURE_MAXIMUM_POSIX_RWLOCKS              0
983    #define CONFIGURE_MEMORY_FOR_POSIX_RWLOCKS(_rwlocks) 0
984  #else
985    #define CONFIGURE_MEMORY_FOR_POSIX_RWLOCKS(_rwlocks) \
986      _Configure_Object_RAM(_rwlocks, sizeof(POSIX_RWLock_Control) )
987  #endif
988
989  #ifdef CONFIGURE_POSIX_INIT_THREAD_TABLE
990
991    #ifdef CONFIGURE_POSIX_HAS_OWN_INIT_THREAD_TABLE
992
993      /*
994       *  The user is defining their own table information and setting the
995       *  appropriate variables for the POSIX Initialization Thread Table.
996       */
997
998    #else
999
1000      #ifndef CONFIGURE_POSIX_INIT_THREAD_ENTRY_POINT
1001        #define CONFIGURE_POSIX_INIT_THREAD_ENTRY_POINT   POSIX_Init
1002      #endif
1003
1004      #ifndef CONFIGURE_POSIX_INIT_THREAD_STACK_SIZE
1005        #define CONFIGURE_POSIX_INIT_THREAD_STACK_SIZE \
1006                (CONFIGURE_MINIMUM_TASK_STACK_SIZE * 2)
1007      #endif
1008
1009      #ifdef CONFIGURE_INIT
1010        posix_initialization_threads_table POSIX_Initialization_threads[] = {
1011          { CONFIGURE_POSIX_INIT_THREAD_ENTRY_POINT, \
1012              CONFIGURE_POSIX_INIT_THREAD_STACK_SIZE }
1013        };
1014      #endif
1015
1016      #define CONFIGURE_POSIX_INIT_THREAD_TABLE_NAME \
1017              POSIX_Initialization_threads
1018
1019      #define CONFIGURE_POSIX_INIT_THREAD_TABLE_SIZE \
1020        sizeof(CONFIGURE_POSIX_INIT_THREAD_TABLE_NAME) / \
1021            sizeof(posix_initialization_threads_table)
1022
1023    #endif    /* CONFIGURE_POSIX_HAS_OWN_INIT_TASK_TABLE */
1024
1025  #else     /* CONFIGURE_POSIX_INIT_THREAD_TABLE */
1026
1027    #define CONFIGURE_POSIX_INIT_THREAD_TABLE_NAME NULL
1028    #define CONFIGURE_POSIX_INIT_THREAD_TABLE_SIZE 0
1029
1030  #endif
1031
1032  #define CONFIGURE_MEMORY_FOR_POSIX \
1033    ( CONFIGURE_MEMORY_FOR_POSIX_MUTEXES( CONFIGURE_MAXIMUM_POSIX_MUTEXES ) + \
1034      CONFIGURE_MEMORY_FOR_POSIX_CONDITION_VARIABLES( \
1035          CONFIGURE_MAXIMUM_POSIX_CONDITION_VARIABLES ) + \
1036      CONFIGURE_MEMORY_FOR_POSIX_KEYS( CONFIGURE_MAXIMUM_POSIX_KEYS ) + \
1037      CONFIGURE_MEMORY_FOR_POSIX_QUEUED_SIGNALS( \
1038          CONFIGURE_MAXIMUM_POSIX_QUEUED_SIGNALS ) + \
1039      CONFIGURE_MEMORY_FOR_POSIX_MESSAGE_QUEUES( \
1040          CONFIGURE_MAXIMUM_POSIX_MESSAGE_QUEUES ) + \
1041      CONFIGURE_MEMORY_FOR_POSIX_SEMAPHORES( \
1042          CONFIGURE_MAXIMUM_POSIX_SEMAPHORES ) + \
1043      CONFIGURE_MEMORY_FOR_POSIX_BARRIERS(CONFIGURE_MAXIMUM_POSIX_BARRIERS) + \
1044      CONFIGURE_MEMORY_FOR_POSIX_SPINLOCKS( \
1045          CONFIGURE_MAXIMUM_POSIX_SPINLOCKS ) + \
1046      CONFIGURE_MEMORY_FOR_POSIX_RWLOCKS( \
1047          CONFIGURE_MAXIMUM_POSIX_RWLOCKS ) + \
1048      CONFIGURE_MEMORY_FOR_POSIX_TIMERS( CONFIGURE_MAXIMUM_POSIX_TIMERS ) + \
1049      (CONFIGURE_POSIX_INIT_THREAD_STACK_SIZE) \
1050     )
1051#else
1052
1053  #define CONFIGURE_MAXIMUM_POSIX_THREADS         0
1054  #define CONFIGURE_MEMORY_PER_TASK_FOR_POSIX_API 0
1055  #define CONFIGURE_MEMORY_FOR_POSIX              0
1056
1057#endif    /* RTEMS_POSIX_API */
1058
1059#ifndef CONFIGURE_POSIX_INIT_THREAD_STACK_SIZE
1060  #define CONFIGURE_POSIX_INIT_THREAD_STACK_SIZE    0
1061#endif
1062
1063/*
1064 *  This block of defines are for applications which use GNAT/RTEMS.
1065 *  GNAT implements each Ada task as a POSIX thread.
1066 */
1067#ifdef CONFIGURE_GNAT_RTEMS
1068
1069  /**
1070   *  The GNAT run-time needs something less than (10) POSIX mutexes.
1071   *  We may be able to get by with less but why bother.
1072   */
1073  #define CONFIGURE_GNAT_MUTEXES 10
1074
1075  /**
1076   *  This is the maximum number of Ada tasks which can be concurrently
1077   *  in existence.  Twenty (20) are required to run all tests in the
1078   *  ACATS (formerly ACVC).
1079   */
1080  #ifndef CONFIGURE_MAXIMUM_ADA_TASKS
1081    #define CONFIGURE_MAXIMUM_ADA_TASKS  20
1082  #endif
1083
1084  /**
1085   * This is the number of non-Ada tasks which invoked Ada code.
1086   */
1087  #ifndef CONFIGURE_MAXIMUM_FAKE_ADA_TASKS
1088    #define CONFIGURE_MAXIMUM_FAKE_ADA_TASKS 0
1089  #endif
1090
1091  /**
1092   * Ada tasks are allocated twice the minimum stack space.
1093   */
1094  #define CONFIGURE_ADA_TASKS_STACK \
1095    (CONFIGURE_MAXIMUM_ADA_TASKS * \
1096      (CONFIGURE_MINIMUM_TASK_STACK_SIZE + (6 * 1024)))
1097
1098#else
1099  #define CONFIGURE_GNAT_MUTEXES           0
1100  #define CONFIGURE_MAXIMUM_ADA_TASKS      0
1101  #define CONFIGURE_MAXIMUM_FAKE_ADA_TASKS 0
1102  #define CONFIGURE_ADA_TASKS_STACK        0
1103#endif
1104
1105/*
1106 *  ITRON API Configuration Parameters
1107 */
1108
1109#ifdef RTEMS_ITRON_API
1110
1111  #include <rtems/itron.h>
1112  #include <rtems/itron/config.h>
1113  #include <rtems/itron/eventflags.h>
1114  #include <rtems/itron/fmempool.h>
1115  #include <rtems/itron/mbox.h>
1116  #include <rtems/itron/msgbuffer.h>
1117  #include <rtems/itron/port.h>
1118  #include <rtems/itron/semaphore.h>
1119  #include <rtems/itron/task.h>
1120  #include <rtems/itron/vmempool.h>
1121
1122  #ifndef CONFIGURE_MAXIMUM_ITRON_TASKS
1123    #define CONFIGURE_MAXIMUM_ITRON_TASKS      0
1124  #endif
1125  #define CONFIGURE_MEMORY_PER_TASK_FOR_ITRON_API 0
1126
1127  #ifndef CONFIGURE_MAXIMUM_ITRON_SEMAPHORES
1128    #define CONFIGURE_MAXIMUM_ITRON_SEMAPHORES                 0
1129    #define CONFIGURE_MEMORY_FOR_ITRON_SEMAPHORES(_semaphores) 0
1130  #else
1131    #define CONFIGURE_MEMORY_FOR_ITRON_SEMAPHORES(_semaphores) \
1132      _Configure_Object_RAM(_semaphores, sizeof(ITRON_Semaphore_Control))
1133  #endif
1134
1135  #ifndef CONFIGURE_MAXIMUM_ITRON_EVENTFLAGS
1136    #define CONFIGURE_MAXIMUM_ITRON_EVENTFLAGS                 0
1137    #define CONFIGURE_MEMORY_FOR_ITRON_EVENTFLAGS(_eventflags) 0
1138  #else
1139    #define CONFIGURE_MEMORY_FOR_ITRON_EVENTFLAGS(_eventflags) \
1140      _Configure_Object_RAM(_eventflags, sizeof(ITRON_Eventflags_Control))
1141  #endif
1142
1143  #ifndef CONFIGURE_MAXIMUM_ITRON_MAILBOXES
1144    #define CONFIGURE_MAXIMUM_ITRON_MAILBOXES                0
1145    #define CONFIGURE_MEMORY_FOR_ITRON_MAILBOXES(_mailboxes) 0
1146  #else
1147    #define CONFIGURE_MEMORY_FOR_ITRON_MAILBOXES(_mailboxes) \
1148      _Configure_Object_RAM(_mailboxes, sizeof(ITRON_Mailbox_Control))
1149  #endif
1150
1151  #ifndef CONFIGURE_MAXIMUM_ITRON_MESSAGE_BUFFERS
1152    #define CONFIGURE_MAXIMUM_ITRON_MESSAGE_BUFFERS                      0
1153    #define CONFIGURE_MEMORY_FOR_ITRON_MESSAGE_BUFFERS(_message_buffers) 0
1154  #else
1155    #define CONFIGURE_MEMORY_FOR_ITRON_MESSAGE_BUFFERS(_message_buffers) \
1156      _Configure_Object_RAM(_message_buffers, \
1157        sizeof(ITRON_Message_buffer_Control))
1158  #endif
1159
1160  #ifndef CONFIGURE_MAXIMUM_ITRON_PORTS
1161    #define CONFIGURE_MAXIMUM_ITRON_PORTS            0
1162    #define CONFIGURE_MEMORY_FOR_ITRON_PORTS(_ports) 0
1163  #else
1164    #define CONFIGURE_MEMORY_FOR_ITRON_PORTS(_ports) \
1165      _Configure_Object_RAM(_ports, sizeof(ITRON_Port_Control))
1166  #endif
1167
1168  #ifndef CONFIGURE_MAXIMUM_ITRON_MEMORY_POOLS
1169    #define CONFIGURE_MAXIMUM_ITRON_MEMORY_POOLS            0
1170    #define CONFIGURE_MEMORY_FOR_ITRON_MEMORY_POOLS(_pools) 0
1171  #else
1172    #define CONFIGURE_MEMORY_FOR_ITRON_MEMORY_POOLS(_pools) \
1173      _Configure_Object_RAM( _pools, sizeof(ITRON_Variable_memory_pool_Control))
1174  #endif
1175
1176  #ifndef CONFIGURE_MAXIMUM_ITRON_FIXED_MEMORY_POOLS
1177    #define CONFIGURE_MAXIMUM_ITRON_FIXED_MEMORY_POOLS            0
1178    #define CONFIGURE_MEMORY_FOR_ITRON_FIXED_MEMORY_POOLS(_pools) 0
1179  #else
1180    #define CONFIGURE_MEMORY_FOR_ITRON_FIXED_MEMORY_POOLS(_pools) \
1181      _Configure_Object_RAM(_pools, sizeof(ITRON_Fixed_memory_pool_Control))
1182  #endif
1183
1184  #ifdef CONFIGURE_ITRON_INIT_TASK_TABLE
1185
1186    #ifdef CONFIGURE_ITRON_HAS_OWN_INIT_TASK_TABLE
1187
1188      /*
1189       *  The user is defining their own table information and setting the
1190       *  appropriate variables for the ITRON Initialization Task Table.
1191       */
1192
1193    #else
1194
1195      #ifndef CONFIGURE_ITRON_INIT_TASK_ENTRY_POINT
1196        #define CONFIGURE_ITRON_INIT_TASK_ENTRY_POINT   ITRON_Init
1197      #endif
1198
1199      #ifndef CONFIGURE_ITRON_INIT_TASK_ATTRIBUTES
1200        #define CONFIGURE_ITRON_INIT_TASK_ATTRIBUTES    TA_HLNG
1201      #endif
1202
1203      #ifndef CONFIGURE_ITRON_INIT_TASK_PRIORITY
1204        #define CONFIGURE_ITRON_INIT_TASK_PRIORITY      1
1205      #endif
1206
1207      #ifndef CONFIGURE_ITRON_INIT_TASK_STACK_SIZE
1208        #define CONFIGURE_ITRON_INIT_TASK_STACK_SIZE \
1209                CONFIGURE_MINIMUM_TASK_STACK_SIZE
1210      #endif
1211
1212      #ifdef CONFIGURE_INIT
1213        itron_initialization_tasks_table ITRON_Initialization_tasks[] = {
1214          { 1,                                    /* ID */
1215            { (VP) 0,                                /* exinfo */
1216              CONFIGURE_ITRON_INIT_TASK_ATTRIBUTES,  /* task attributes */
1217              CONFIGURE_ITRON_INIT_TASK_ENTRY_POINT, /* task start address */
1218              CONFIGURE_ITRON_INIT_TASK_PRIORITY,    /* initial task priority */
1219              CONFIGURE_ITRON_INIT_TASK_STACK_SIZE   /* stack size */
1220            }
1221          }
1222        };
1223      #endif
1224
1225      #define CONFIGURE_ITRON_INIT_TASK_TABLE_NAME ITRON_Initialization_tasks
1226
1227      #define CONFIGURE_ITRON_INIT_TASK_TABLE_SIZE \
1228        sizeof(CONFIGURE_ITRON_INIT_TASK_TABLE_NAME) / \
1229            sizeof(itron_initialization_tasks_table)
1230
1231    #endif    /* CONFIGURE_ITRON_HAS_OWN_INIT_TASK_TABLE */
1232
1233  #else     /* CONFIGURE_ITRON_INIT_TASK_TABLE */
1234
1235    #define CONFIGURE_ITRON_INIT_TASK_TABLE_NAME NULL
1236    #define CONFIGURE_ITRON_INIT_TASK_TABLE_SIZE 0
1237    #define CONFIGURE_ITRON_INIT_TASK_STACK_SIZE 0
1238
1239  #endif
1240
1241  #define CONFIGURE_MEMORY_FOR_ITRON \
1242    ( CONFIGURE_MEMORY_FOR_ITRON_SEMAPHORES( \
1243          CONFIGURE_MAXIMUM_ITRON_SEMAPHORES ) + \
1244      CONFIGURE_MEMORY_FOR_ITRON_EVENTFLAGS( \
1245          CONFIGURE_MAXIMUM_ITRON_EVENTFLAGS ) + \
1246      CONFIGURE_MEMORY_FOR_ITRON_MAILBOXES( \
1247          CONFIGURE_MAXIMUM_ITRON_MAILBOXES ) + \
1248      CONFIGURE_MEMORY_FOR_ITRON_MESSAGE_BUFFERS( \
1249          CONFIGURE_MAXIMUM_ITRON_MESSAGE_BUFFERS ) + \
1250      CONFIGURE_MEMORY_FOR_ITRON_PORTS( \
1251          CONFIGURE_MAXIMUM_ITRON_PORTS ) + \
1252      CONFIGURE_MEMORY_FOR_ITRON_MEMORY_POOLS( \
1253          CONFIGURE_MAXIMUM_ITRON_MEMORY_POOLS ) + \
1254      CONFIGURE_MEMORY_FOR_ITRON_FIXED_MEMORY_POOLS( \
1255          CONFIGURE_MAXIMUM_ITRON_FIXED_MEMORY_POOLS ) + \
1256      CONFIGURE_ITRON_INIT_TASK_STACK_SIZE \
1257     )
1258
1259#else
1260
1261  #define CONFIGURE_MAXIMUM_ITRON_TASKS               0
1262  #define CONFIGURE_MAXIMUM_ITRON_SEMAPHORES          0
1263  #define CONFIGURE_MAXIMUM_ITRON_EVENTFLAGS          0
1264  #define CONFIGURE_MAXIMUM_ITRON_MAILBOXES           0
1265  #define CONFIGURE_MAXIMUM_ITRON_MESSAGE_BUFFERS     0
1266  #define CONFIGURE_MAXIMUM_ITRON_PORTS               0
1267  #define CONFIGURE_MAXIMUM_ITRON_MEMORY_POOLS        0
1268  #define CONFIGURE_MAXIMUM_ITRON_FIXED_MEMORY_POOLS  0
1269  #define CONFIGURE_MEMORY_PER_TASK_FOR_ITRON_API     0
1270  #define CONFIGURE_MEMORY_FOR_ITRON                  0
1271
1272#endif    /* RTEMS_ITRON_API */
1273
1274/**
1275 *  This macro specifies the amount of memory to be reserved for the
1276 *  Newlib C Library reentrancy structure -- if we are using newlib.
1277 */
1278
1279#if (defined(RTEMS_NEWLIB) && !defined(CONFIGURE_DISABLE_NEWLIB_REENTRANCY))
1280  #include <reent.h>
1281
1282  #define CONFIGURE_MEMORY_PER_TASK_FOR_NEWLIB \
1283    _Configure_From_workspace(sizeof(struct _reent))
1284#else
1285  #define CONFIGURE_MEMORY_PER_TASK_FOR_NEWLIB 0
1286#endif
1287
1288/*
1289 *  Calculate the RAM size based on the maximum number of objects configured.
1290 */
1291
1292#ifndef CONFIGURE_EXECUTIVE_RAM_SIZE
1293
1294/**
1295 *  Account for allocating the following per object
1296 *    + array of object control structures
1297 *    + local pointer table -- pointer per object plus a zero'th
1298 *      entry in the local pointer table.
1299 */
1300
1301#define CONFIGURE_MEMORY_FOR_TASKS(_tasks, _number_FP_tasks) \
1302 ( \
1303  _Configure_Object_RAM(_tasks, sizeof(Thread_Control)) + \
1304  ((_tasks) * \
1305   (_Configure_From_workspace(CONFIGURE_MINIMUM_TASK_STACK_SIZE) + \
1306    _Configure_From_workspace(CONFIGURE_MEMORY_PER_TASK_FOR_CLASSIC_API) + \
1307    CONFIGURE_MEMORY_PER_TASK_FOR_NEWLIB + \
1308    CONFIGURE_MEMORY_PER_TASK_FOR_POSIX_API + \
1309    CONFIGURE_MEMORY_PER_TASK_FOR_ITRON_API))  + \
1310  _Configure_From_workspace((_number_FP_tasks) * CONTEXT_FP_SIZE) \
1311 )
1312
1313/**
1314 *  This defines the amount of memory configured for the multiprocessing
1315 *  support required by this application.
1316 */
1317#ifdef CONFIGURE_MP_APPLICATION
1318  #define CONFIGURE_MEMORY_FOR_MP \
1319    (CONFIGURE_MEMORY_FOR_PROXIES(CONFIGURE_MP_MAXIMUM_PROXIES) + \
1320     CONFIGURE_MEMORY_FOR_GLOBAL_OBJECTS( \
1321             CONFIGURE_MP_MAXIMUM_GLOBAL_OBJECTS) + \
1322     CONFIGURE_MEMORY_FOR_TASKS(1, 1) + \
1323     CONFIGURE_EXTRA_MPCI_RECEIVE_SERVER_STACK \
1324  )
1325#else
1326  #define CONFIGURE_MEMORY_FOR_MP  0
1327#endif
1328
1329/**
1330 *  This is so we can account for tasks with stacks greater than minimum
1331 *  size.  This is in bytes.
1332 */
1333#ifndef CONFIGURE_EXTRA_TASK_STACKS
1334  #define CONFIGURE_EXTRA_TASK_STACKS 0
1335#endif
1336
1337/**
1338 *  The following macro is used to calculate the memory allocated by RTEMS
1339 *  for the message buffers associated with a particular message queue.
1340 *  There is a fixed amount of overhead per message.
1341 */
1342#define CONFIGURE_MESSAGE_BUFFERS_FOR_QUEUE(_messages, _size) \
1343    _Configure_From_workspace( \
1344      (_messages) * ((_size) + sizeof(CORE_message_queue_Buffer_control)))
1345
1346/**
1347 *  This macros is set to the amount of memory required for pending message
1348 *  buffers in bytes.  It should be constructed by adding together a
1349 *  set of values determined by CONFIGURE_MESSAGE_BUFFERS_FOR_QUEUE.
1350 */
1351#ifndef CONFIGURE_MESSAGE_BUFFER_MEMORY
1352  #define CONFIGURE_MESSAGE_BUFFER_MEMORY 0
1353#endif
1354
1355/**
1356 *  This macro is available just in case the confdefs.h file underallocates
1357 *  memory for a particular application.  This lets the user add some extra
1358 *  memory in case something broken and underestimates.
1359 *
1360 *  It is also possible for cases where confdefs.h overallocates memory,
1361 *  you could substract memory from the allocated.  The estimate is just
1362 *  that, an estimate, and assumes worst case alignment and padding on
1363 *  each allocated element.  So in some cases it could be too conservative.
1364 *
1365 *  @note Historically this was used for message buffers.
1366 */
1367#ifndef CONFIGURE_MEMORY_OVERHEAD
1368  #define CONFIGURE_MEMORY_OVERHEAD 0
1369#endif
1370
1371/**
1372 *  On architectures that use Simple Vectored Interrupts, it is RTEMS
1373 *  responsibility to allocate the vector table.  This avoids reserving
1374 *  the memory on architectures that use the Programmable Interrupt
1375 *  Controller Vectored Interrupts.
1376 */
1377#if (CPU_SIMPLE_VECTORED_INTERRUPTS == TRUE)
1378  /*
1379   *  This is a (hopefully) temporary hack.  On the mips, the number of
1380   *  vectors is NOT statically defined.  But it has to be statically
1381   *  defined for this to work.  This is an issue looking for a nice
1382   *  solution.
1383   */
1384  #if defined(__mips__)
1385    #define CONFIGURE_INTERRUPT_VECTOR_TABLE (sizeof(ISR_Handler_entry) * 256)
1386  #else
1387    #define CONFIGURE_INTERRUPT_VECTOR_TABLE \
1388      (sizeof(ISR_Handler_entry) * ISR_NUMBER_OF_VECTORS)
1389  #endif
1390#else
1391  #define CONFIGURE_INTERRUPT_VECTOR_TABLE 0
1392#endif
1393
1394/**
1395 *  RTEMS uses one instance of an internal mutex class.  This accounts
1396 *  for that mutex
1397 */
1398#define CONFIGURE_API_MUTEX_MEMORY \
1399  _Configure_Object_RAM(1, sizeof(API_Mutex_Control))
1400
1401/**
1402 *  This defines the memory used by the thread ready chains.  There is
1403 *  one chain per priority.
1404 */
1405#define CONFIGURE_MEMORY_FOR_THREAD_READY_CHAINS \
1406    _Configure_From_workspace( \
1407        ((CONFIGURE_MAXIMUM_PRIORITY+1) * sizeof(Chain_Control)) )
1408/**
1409 *  This defines the amount of memory reserved for the IDLE task
1410 *  control structures and stack.
1411 */
1412#define CONFIGURE_MEMORY_FOR_IDLE_TASK \
1413    (CONFIGURE_MEMORY_FOR_TASKS(1, 0) + \
1414     (CONFIGURE_IDLE_TASK_STACK_SIZE - CONFIGURE_MINIMUM_TASK_STACK_SIZE))
1415
1416/**
1417 *  This macro accounts for general RTEMS system overhead.
1418 */
1419#define CONFIGURE_MEMORY_FOR_SYSTEM_OVERHEAD \
1420  ( CONFIGURE_MEMORY_FOR_IDLE_TASK +                /* IDLE and stack */ \
1421    CONFIGURE_MEMORY_FOR_THREAD_READY_CHAINS +     /* Ready chains */ \
1422    CONFIGURE_INTERRUPT_VECTOR_TABLE +             /* interrupt vectors */ \
1423    CONFIGURE_INTERRUPT_STACK_MEMORY +             /* interrupt stack */ \
1424    CONFIGURE_API_MUTEX_MEMORY                     /* allocation mutex */ \
1425  )
1426
1427/*
1428 *  Now account for any extra memory that initialization tasks or threads
1429 *  may have requested.
1430 */
1431
1432/**
1433 *  This accounts for any extra memory required by the Classic API
1434 *  Initialization Task.
1435 */
1436#if (CONFIGURE_INIT_TASK_STACK_SIZE > CONFIGURE_MINIMUM_TASK_STACK_SIZE)
1437  #define CONFIGURE_INITIALIZATION_THREADS_STACKS_CLASSIC_PART \
1438      (CONFIGURE_INIT_TASK_STACK_SIZE - CONFIGURE_MINIMUM_TASK_STACK_SIZE)
1439#else
1440  #define CONFIGURE_INITIALIZATION_THREADS_STACKS_CLASSIC_PART 0
1441#endif
1442
1443/**
1444 *  This accounts for any extra memory required by the POSIX API
1445 *  Initialization Thread.
1446 */
1447#if defined(RTEMS_POSIX_API) && \
1448    (CONFIGURE_POSIX_INIT_THREAD_STACK_SIZE > CONFIGURE_MINIMUM_TASK_STACK_SIZE)
1449  #define CONFIGURE_INITIALIZATION_THREADS_STACKS_POSIX_PART \
1450    (CONFIGURE_POSIX_INIT_THREAD_STACK_SIZE - CONFIGURE_MINIMUM_TASK_STACK_SIZE)
1451#else
1452  #define CONFIGURE_INITIALIZATION_THREADS_STACKS_POSIX_PART 0
1453#endif
1454
1455/**
1456 *  This accounts for any extra memory required by the ITRON API
1457 *  Initialization Task.
1458 */
1459#if defined(RTEMS_ITRON_API) && \
1460    (CONFIGURE_ITRON_INIT_TASK_STACK_SIZE > CONFIGURE_MINIMUM_TASK_STACK_SIZE)
1461  #define CONFIGURE_INITIALIZATION_THREADS_STACKS_ITRON_PART \
1462      (CONFIGURE_ITRON_INIT_TASK_STACK_SIZE - CONFIGURE_MINIMUM_TASK_STACK_SIZE)
1463#else
1464  #define CONFIGURE_INITIALIZATION_THREADS_STACKS_ITRON_PART 0
1465#endif
1466
1467/**
1468 *  This macro provides a summation of the various initialization task
1469 *  and thread stack requirements.
1470 */
1471#define CONFIGURE_INITIALIZATION_THREADS_STACKS \
1472    (CONFIGURE_INITIALIZATION_THREADS_STACKS_CLASSIC_PART + \
1473    CONFIGURE_INITIALIZATION_THREADS_STACKS_POSIX_PART + \
1474    CONFIGURE_INITIALIZATION_THREADS_STACKS_ITRON_PART)
1475
1476/**
1477 *  This macro provides a summation of the various task and thread
1478 *  requirements.
1479 */
1480#define CONFIGURE_TOTAL_TASKS_AND_THREADS \
1481   (CONFIGURE_MAXIMUM_TASKS + \
1482    CONFIGURE_MAXIMUM_POSIX_THREADS + CONFIGURE_MAXIMUM_ADA_TASKS + \
1483    CONFIGURE_MAXIMUM_ITRON_TASKS \
1484   )
1485
1486/**
1487 *  This macro reserves the memory required by the statically configured
1488 *  user extensions.
1489 */
1490#define CONFIGURE_MEMORY_FOR_STATIC_EXTENSIONS \
1491   _Configure_From_workspace( \
1492     (CONFIGURE_NEWLIB_EXTENSION + CONFIGURE_STACK_CHECKER_EXTENSION) * \
1493      sizeof(User_extensions_Control) \
1494   )
1495
1496/**
1497 *  This macro provides a summation of the memory required by the
1498 *  Classic API as configured.
1499 */
1500#define CONFIGURE_MEMORY_FOR_CLASSIC \
1501  (CONFIGURE_MEMORY_FOR_TASK_VARIABLES(CONFIGURE_MAXIMUM_TASK_VARIABLES) + \
1502   CONFIGURE_MEMORY_FOR_TIMERS(CONFIGURE_MAXIMUM_TIMERS) + \
1503   CONFIGURE_MEMORY_FOR_SEMAPHORES(CONFIGURE_MAXIMUM_SEMAPHORES + \
1504     CONFIGURE_LIBIO_SEMAPHORES + CONFIGURE_TERMIOS_SEMAPHORES) + \
1505   CONFIGURE_MEMORY_FOR_MESSAGE_QUEUES(CONFIGURE_MAXIMUM_MESSAGE_QUEUES) + \
1506   CONFIGURE_MEMORY_FOR_PARTITIONS(CONFIGURE_MAXIMUM_PARTITIONS) + \
1507   CONFIGURE_MEMORY_FOR_REGIONS( CONFIGURE_MAXIMUM_REGIONS ) + \
1508   CONFIGURE_MEMORY_FOR_PORTS(CONFIGURE_MAXIMUM_PORTS) + \
1509   CONFIGURE_MEMORY_FOR_PERIODS(CONFIGURE_MAXIMUM_PERIODS) + \
1510   CONFIGURE_MEMORY_FOR_BARRIERS(CONFIGURE_MAXIMUM_BARRIERS) + \
1511   CONFIGURE_MEMORY_FOR_USER_EXTENSIONS(CONFIGURE_MAXIMUM_USER_EXTENSIONS) \
1512  )
1513
1514#if defined(CONFIGURE_CONFDEFS_DEBUG) && defined(CONFIGURE_INIT)
1515  /**
1516   *  This is a debug mechanism, so if you need to, the executable will
1517   *  have a structure with various partial values.  Add to this as you
1518   *  need to.  Viewing this structure in gdb combined with dumping
1519   *  the Configuration structures generated should help a lot in tracing
1520   *  down errors and analyzing where over and under allocations are.
1521   */
1522  typedef struct {
1523    uint32_t SYSTEM_OVERHEAD;
1524    uint32_t STATIC_EXTENSIONS;
1525    uint32_t INITIALIZATION_THREADS_STACKS;
1526
1527    uint32_t CLASSIC;
1528    uint32_t POSIX;
1529    uint32_t ITRON;
1530
1531    /* System overhead pieces */
1532    uint32_t INTERRUPT_VECTOR_TABLE;
1533    uint32_t INTERRUPT_STACK_MEMORY;
1534    uint32_t THREAD_READY_CHAINS;
1535    uint32_t MEMORY_FOR_IDLE_TASK;
1536
1537    /* Classic API Pieces */
1538    uint32_t TASK_VARIABLES;
1539    uint32_t TIMERS;
1540    uint32_t SEMAPHORES;
1541    uint32_t MESSAGE_QUEUES;
1542    uint32_t PARTITIONS;
1543    uint32_t REGIONS;
1544    uint32_t PORTS;
1545    uint32_t PERIODS;
1546    uint32_t BARRIERS;
1547    uint32_t USER_EXTENSIONS;
1548#ifdef RTEMS_POSIX_API
1549    /* POSIX API Pieces */
1550    uint32_t POSIX_MUTEXES;
1551    uint32_t POSIX_CONDITION_VARIABLES;
1552    uint32_t POSIX_KEYS;
1553    uint32_t POSIX_TIMERS;
1554    uint32_t POSIX_QUEUED_SIGNALS;
1555    uint32_t POSIX_MESSAGE_QUEUES;
1556    uint32_t POSIX_SEMAPHORES;
1557    uint32_t POSIX_BARRIERS;
1558    uint32_t POSIX_SPINLOCKS;
1559    uint32_t POSIX_RWLOCKS;
1560#endif
1561#ifdef RTEMS_ITRON_API
1562    /* ITRON API Pieces */
1563    uint32_t ITRON_SEMAPHORES;
1564    uint32_t ITRON_EVENTFLAGS;
1565    uint32_t ITRON_MAILBOXES;
1566    uint32_t ITRON_MESSAGE_BUFFERS;
1567    uint32_t ITRON_PORTS;
1568    uint32_t ITRON_MEMORY_POOLS;
1569    uint32_t ITRON_FIXED_MEMORY_POOLS;
1570#endif
1571  } Configuration_Debug_t;
1572
1573  Configuration_Debug_t Configuration_Memory_Debug = {
1574    /* General Information */
1575    CONFIGURE_MEMORY_FOR_SYSTEM_OVERHEAD,
1576    CONFIGURE_MEMORY_FOR_STATIC_EXTENSIONS,
1577    CONFIGURE_INITIALIZATION_THREADS_STACKS,
1578    CONFIGURE_MEMORY_FOR_CLASSIC,
1579    CONFIGURE_MEMORY_FOR_POSIX,
1580    CONFIGURE_MEMORY_FOR_ITRON,
1581
1582    /* System overhead pieces */
1583    CONFIGURE_INTERRUPT_VECTOR_TABLE,
1584    CONFIGURE_INTERRUPT_STACK_MEMORY,
1585    CONFIGURE_MEMORY_FOR_THREAD_READY_CHAINS,
1586    CONFIGURE_MEMORY_FOR_IDLE_TASK,
1587
1588    /* Classic API Pieces */
1589    CONFIGURE_MEMORY_FOR_TASK_VARIABLES(CONFIGURE_MAXIMUM_TASK_VARIABLES),
1590    CONFIGURE_MEMORY_FOR_TIMERS(CONFIGURE_MAXIMUM_TIMERS),
1591    CONFIGURE_MEMORY_FOR_SEMAPHORES(CONFIGURE_MAXIMUM_SEMAPHORES +
1592       CONFIGURE_LIBIO_SEMAPHORES + CONFIGURE_TERMIOS_SEMAPHORES),
1593    CONFIGURE_MEMORY_FOR_MESSAGE_QUEUES(CONFIGURE_MAXIMUM_MESSAGE_QUEUES),
1594    CONFIGURE_MEMORY_FOR_PARTITIONS(CONFIGURE_MAXIMUM_PARTITIONS),
1595    CONFIGURE_MEMORY_FOR_REGIONS( CONFIGURE_MAXIMUM_REGIONS ),
1596    CONFIGURE_MEMORY_FOR_PORTS(CONFIGURE_MAXIMUM_PORTS),
1597    CONFIGURE_MEMORY_FOR_PERIODS(CONFIGURE_MAXIMUM_PERIODS),
1598    CONFIGURE_MEMORY_FOR_BARRIERS(CONFIGURE_MAXIMUM_BARRIERS),
1599    CONFIGURE_MEMORY_FOR_USER_EXTENSIONS(CONFIGURE_MAXIMUM_USER_EXTENSIONS),
1600
1601#ifdef RTEMS_POSIX_API
1602    /* POSIX API Pieces */
1603    CONFIGURE_MEMORY_FOR_POSIX_MUTEXES( CONFIGURE_MAXIMUM_POSIX_MUTEXES ),
1604    CONFIGURE_MEMORY_FOR_POSIX_CONDITION_VARIABLES(
1605      CONFIGURE_MAXIMUM_POSIX_CONDITION_VARIABLES ),
1606    CONFIGURE_MEMORY_FOR_POSIX_KEYS( CONFIGURE_MAXIMUM_POSIX_KEYS ),
1607    CONFIGURE_MEMORY_FOR_POSIX_QUEUED_SIGNALS(
1608      CONFIGURE_MAXIMUM_POSIX_QUEUED_SIGNALS ),
1609    CONFIGURE_MEMORY_FOR_POSIX_MESSAGE_QUEUES(
1610      CONFIGURE_MAXIMUM_POSIX_MESSAGE_QUEUES ),
1611    CONFIGURE_MEMORY_FOR_POSIX_SEMAPHORES( CONFIGURE_MAXIMUM_POSIX_SEMAPHORES ),
1612    CONFIGURE_MEMORY_FOR_POSIX_BARRIERS( CONFIGURE_MAXIMUM_POSIX_BARRIERS ),
1613    CONFIGURE_MEMORY_FOR_POSIX_SPINLOCKS( CONFIGURE_MAXIMUM_POSIX_SPINLOCKS ),
1614    CONFIGURE_MEMORY_FOR_POSIX_RWLOCKS( CONFIGURE_MAXIMUM_POSIX_RWLOCKS ),
1615    CONFIGURE_MEMORY_FOR_POSIX_TIMERS( CONFIGURE_MAXIMUM_POSIX_TIMERS ),
1616#endif
1617
1618#ifdef RTEMS_ITRON_API
1619    /* ITRON API Pieces */
1620    CONFIGURE_MEMORY_FOR_ITRON_SEMAPHORES( CONFIGURE_MAXIMUM_ITRON_SEMAPHORES ),
1621    CONFIGURE_MEMORY_FOR_ITRON_EVENTFLAGS( CONFIGURE_MAXIMUM_ITRON_EVENTFLAGS ),
1622    CONFIGURE_MEMORY_FOR_ITRON_MAILBOXES( CONFIGURE_MAXIMUM_ITRON_MAILBOXES ),
1623    CONFIGURE_MEMORY_FOR_ITRON_MESSAGE_BUFFERS(
1624        CONFIGURE_MAXIMUM_ITRON_MESSAGE_BUFFERS ),
1625    CONFIGURE_MEMORY_FOR_ITRON_PORTS( CONFIGURE_MAXIMUM_ITRON_PORTS ),
1626    CONFIGURE_MEMORY_FOR_ITRON_MEMORY_POOLS(
1627        CONFIGURE_MAXIMUM_ITRON_MEMORY_POOLS ),
1628    CONFIGURE_MEMORY_FOR_ITRON_FIXED_MEMORY_POOLS(
1629        CONFIGURE_MAXIMUM_ITRON_FIXED_MEMORY_POOLS ),
1630#endif
1631  };
1632#endif
1633
1634/**
1635 *  This calculates the memory required for the executive workspace.
1636 */
1637#define CONFIGURE_EXECUTIVE_RAM_SIZE \
1638(( \
1639   CONFIGURE_MEMORY_FOR_SYSTEM_OVERHEAD + \
1640   CONFIGURE_MEMORY_FOR_TASKS( \
1641     CONFIGURE_TOTAL_TASKS_AND_THREADS, CONFIGURE_TOTAL_TASKS_AND_THREADS) + \
1642   CONFIGURE_MEMORY_FOR_CLASSIC + \
1643   CONFIGURE_MEMORY_FOR_POSIX + \
1644   (CONFIGURE_MAXIMUM_POSIX_THREADS * CONFIGURE_MINIMUM_TASK_STACK_SIZE ) + \
1645   CONFIGURE_MEMORY_FOR_ITRON + \
1646   CONFIGURE_INITIALIZATION_THREADS_STACKS + \
1647   CONFIGURE_MEMORY_FOR_STATIC_EXTENSIONS + \
1648   CONFIGURE_MEMORY_FOR_MP + \
1649   CONFIGURE_MESSAGE_BUFFER_MEMORY + \
1650   (CONFIGURE_MEMORY_OVERHEAD * 1024) + \
1651   (CONFIGURE_EXTRA_TASK_STACKS) + (CONFIGURE_ADA_TASKS_STACK) \
1652) & ~0x7)
1653#endif
1654
1655#ifdef CONFIGURE_INIT
1656  /**
1657   *  This is the Classic API Configuration Table.
1658   */
1659  rtems_api_configuration_table Configuration_RTEMS_API = {
1660    CONFIGURE_MAXIMUM_TASKS,
1661    CONFIGURE_NOTEPADS_ENABLED,
1662    CONFIGURE_MAXIMUM_TIMERS,
1663    CONFIGURE_MAXIMUM_SEMAPHORES + CONFIGURE_LIBIO_SEMAPHORES +
1664      CONFIGURE_TERMIOS_SEMAPHORES,
1665    CONFIGURE_MAXIMUM_MESSAGE_QUEUES,
1666    CONFIGURE_MAXIMUM_PARTITIONS,
1667    CONFIGURE_MAXIMUM_REGIONS,
1668    CONFIGURE_MAXIMUM_PORTS,
1669    CONFIGURE_MAXIMUM_PERIODS,
1670    CONFIGURE_MAXIMUM_BARRIERS,
1671    CONFIGURE_INIT_TASK_TABLE_SIZE,
1672    CONFIGURE_INIT_TASK_TABLE
1673  };
1674
1675  #ifdef RTEMS_POSIX_API
1676    /**
1677     *  This is the POSIX API Configuration Table.
1678     */
1679    posix_api_configuration_table Configuration_POSIX_API = {
1680      CONFIGURE_MAXIMUM_POSIX_THREADS + CONFIGURE_MAXIMUM_ADA_TASKS,
1681      CONFIGURE_MAXIMUM_POSIX_MUTEXES + CONFIGURE_GNAT_MUTEXES +
1682        CONFIGURE_MAXIMUM_ADA_TASKS + CONFIGURE_MAXIMUM_FAKE_ADA_TASKS,
1683      CONFIGURE_MAXIMUM_POSIX_CONDITION_VARIABLES +
1684        CONFIGURE_MAXIMUM_ADA_TASKS + CONFIGURE_MAXIMUM_FAKE_ADA_TASKS,
1685      CONFIGURE_MAXIMUM_POSIX_KEYS,
1686      CONFIGURE_MAXIMUM_POSIX_TIMERS,
1687      CONFIGURE_MAXIMUM_POSIX_QUEUED_SIGNALS,
1688      CONFIGURE_MAXIMUM_POSIX_MESSAGE_QUEUES,
1689      CONFIGURE_MAXIMUM_POSIX_SEMAPHORES,
1690      CONFIGURE_MAXIMUM_POSIX_BARRIERS,
1691      CONFIGURE_MAXIMUM_POSIX_RWLOCKS,
1692      CONFIGURE_MAXIMUM_POSIX_SPINLOCKS,
1693      CONFIGURE_POSIX_INIT_THREAD_TABLE_SIZE,
1694      CONFIGURE_POSIX_INIT_THREAD_TABLE_NAME
1695    };
1696  #endif
1697
1698  #ifdef RTEMS_ITRON_API
1699    /**
1700     *  This is the ITRON API Configuration Table.
1701     */
1702    itron_api_configuration_table Configuration_ITRON_API = {
1703      CONFIGURE_MAXIMUM_ITRON_TASKS,
1704      CONFIGURE_MAXIMUM_ITRON_SEMAPHORES,
1705      CONFIGURE_MAXIMUM_ITRON_EVENTFLAGS,
1706      CONFIGURE_MAXIMUM_ITRON_MAILBOXES,
1707      CONFIGURE_MAXIMUM_ITRON_MESSAGE_BUFFERS,
1708      CONFIGURE_MAXIMUM_ITRON_PORTS,
1709      CONFIGURE_MAXIMUM_ITRON_MEMORY_POOLS,
1710      CONFIGURE_MAXIMUM_ITRON_FIXED_MEMORY_POOLS,
1711      CONFIGURE_ITRON_INIT_TASK_TABLE_SIZE,
1712      CONFIGURE_ITRON_INIT_TASK_TABLE_NAME
1713    };
1714  #endif
1715
1716  /** This variable specifies the minimum stack size for tasks in an RTEMS
1717   *  application.
1718   *
1719   *  @note This is left as a simple uint32_t so it can be externed as
1720   *        needed without requring being high enough logical to
1721   *        include the full configuration table.
1722   */
1723  uint32_t rtems_minimum_stack_size =
1724    CONFIGURE_MINIMUM_TASK_STACK_SIZE;
1725
1726  /** This variable specifies the maximum priority value that
1727   *  a task may have.  This must be a power of 2 between 4
1728   *  and 256 and is specified in terms of Classic API
1729   *  priority values.
1730   *
1731   *  @note This is left as a simple uint8_t so it can be externed as
1732   *        needed without requring being high enough logical to
1733   *        include the full configuration table.
1734   */
1735  uint8_t rtems_maximum_priority = CONFIGURE_MAXIMUM_PRIORITY;
1736
1737  /**
1738   *  This is the primary Configuration Table for this application.
1739   */
1740  rtems_configuration_table Configuration = {
1741    CONFIGURE_EXECUTIVE_RAM_WORK_AREA,
1742    CONFIGURE_EXECUTIVE_RAM_SIZE,             /* required RTEMS workspace */
1743    CONFIGURE_MAXIMUM_USER_EXTENSIONS,        /* maximum dynamic extensions */
1744    CONFIGURE_MICROSECONDS_PER_TICK,          /* microseconds per clock tick */
1745    CONFIGURE_TICKS_PER_TIMESLICE,            /* ticks per timeslice quantum */
1746    CONFIGURE_IDLE_TASK_BODY,                 /* user's IDLE task */
1747    CONFIGURE_IDLE_TASK_STACK_SIZE,           /* IDLE task stack size */
1748    CONFIGURE_INTERRUPT_STACK_SIZE,           /* interrupt stack size */
1749    CONFIGURE_TASK_STACK_ALLOCATOR,           /* stack allocator */
1750    CONFIGURE_TASK_STACK_DEALLOCATOR,         /* stack deallocator */
1751    CONFIGURE_ZERO_WORKSPACE_AUTOMATICALLY,   /* true to clear memory */
1752    CONFIGURE_MAXIMUM_DRIVERS,                /* maximum device drivers */
1753    CONFIGURE_NUMBER_OF_DRIVERS,              /* static device drivers */
1754    Device_drivers,                           /* pointer to driver table */
1755    CONFIGURE_NUMBER_OF_INITIAL_EXTENSIONS,   /* number of static extensions */
1756    CONFIGURE_INITIAL_EXTENSION_TABLE,        /* pointer to static extensions */
1757    #if defined(RTEMS_MULTIPROCESSING)
1758      CONFIGURE_MULTIPROCESSING_TABLE,        /* pointer to MP config table */
1759    #endif
1760    &Configuration_RTEMS_API,                 /* pointer to RTEMS API config */
1761    #ifdef RTEMS_POSIX_API
1762      &Configuration_POSIX_API,               /* pointer to POSIX API config */
1763    #else
1764      NULL,                                   /* pointer to POSIX API config */
1765    #endif
1766    #ifdef RTEMS_ITRON_API
1767      &Configuration_ITRON_API                /* pointer to ITRON API config */
1768    #else
1769      NULL                                    /* pointer to ITRON API config */
1770    #endif
1771  };
1772#endif
1773
1774#endif /* CONFIGURE_HAS_OWN_CONFIGURATION_TABLE */
1775
1776/*
1777 *  If the user has configured a set of Classic API Initialization Tasks,
1778 *  then we need to install the code that runs that loop.
1779 */
1780#ifdef CONFIGURE_INIT
1781  #ifdef CONFIGURE_RTEMS_INIT_TASKS_TABLE
1782    void (_RTEMS_tasks_Initialize_user_tasks_body)(void);
1783    void (*_RTEMS_tasks_Initialize_user_tasks_p)(void) =
1784              _RTEMS_tasks_Initialize_user_tasks_body;
1785  #else
1786    void (*_RTEMS_tasks_Initialize_user_tasks_p)(void) = NULL;
1787  #endif
1788#endif
1789
1790/*
1791 *  If the user has configured a set of POSIX Initialization Threads,
1792 *  then we need to install the code that runs that loop.
1793 */
1794#ifdef RTEMS_POSIX_API
1795  #ifdef CONFIGURE_INIT
1796    #ifdef CONFIGURE_POSIX_INIT_THREAD_TABLE
1797      void _POSIX_Threads_Initialize_user_threads_body(void);
1798      void (*_POSIX_Threads_Initialize_user_threads_p)(void) =
1799                _POSIX_Threads_Initialize_user_threads_body;
1800    #else
1801      void (*_POSIX_Threads_Initialize_user_threads_p)(void) = NULL;
1802    #endif
1803  #endif
1804#endif
1805
1806/*
1807 *  If the user has configured a set of ITRON Initialization Tasks,
1808 *  then we need to install the code that runs that loop.
1809 */
1810#ifdef RTEMS_ITRON_API
1811  #ifdef CONFIGURE_INIT
1812    #ifdef CONFIGURE_ITRON_INIT_TASK_TABLE
1813      void _ITRON_Task_Initialize_user_tasks_body(void);
1814      void (*_ITRON_Initialize_user_tasks_p)(void) =
1815                _ITRON_Task_Initialize_user_tasks_body;
1816    #else
1817      void (*_ITRON_Initialize_user_tasks_p)(void) = NULL;
1818    #endif
1819  #endif
1820#endif
1821
1822#ifdef __cplusplus
1823}
1824#endif
1825
1826/******************************************************************
1827 ******************************************************************
1828 ******************************************************************
1829 *         CONFIGURATION WARNINGS AND ERROR CHECKING              *
1830 ******************************************************************
1831 ******************************************************************
1832 ******************************************************************
1833 */
1834
1835/*
1836 *  Make sure a task/thread of some sort is configured.
1837 *
1838 *  When analyzing RTEMS to find the smallest possible of memory
1839 *  that must be allocated, you probably do want to configure 0
1840 *  tasks/threads so there is a smaller set of calls to _Workspace_Allocate
1841 *  to analyze.
1842 */
1843#if !defined(CONFIGURE_IDLE_TASK_INITIALIZES_APPLICATION)
1844  #if (CONFIGURE_MAXIMUM_TASKS == 0) && \
1845      (CONFIGURE_MAXIMUM_POSIX_THREADS == 0) && \
1846      (CONFIGURE_MAXIMUM_ADA_TASKS == 0) &&  \
1847      (CONFIGURE_MAXIMUM_ITRON_TASKS == 0)
1848    #error "CONFIGURATION ERROR: No tasks or threads configured!!"
1849  #endif
1850#endif
1851
1852/*
1853 *  Make sure at least one of the initialization task/thread
1854 *  tables was defined.
1855 */
1856#if !defined(CONFIGURE_RTEMS_INIT_TASKS_TABLE) && \
1857    !defined(CONFIGURE_POSIX_INIT_THREAD_TABLE) && \
1858    !defined(CONFIGURE_ITRON_INIT_TASK_TABLE) && \
1859    !defined(CONFIGURE_IDLE_TASK_INITIALIZES_APPLICATION)
1860#error "CONFIGURATION ERROR: No initialization tasks or threads configured!!"
1861#endif
1862
1863/*
1864 *  If the user is trying to configure a multiprocessing application and
1865 *  RTEMS was not configured and built multiprocessing, then error out.
1866 */
1867#if defined(CONFIGURE_MP_APPLICATION) && \
1868    !defined(RTEMS_MULTIPROCESSING)
1869#error "CONFIGURATION ERROR: RTEMS not configured for multiprocessing!!"
1870#endif
1871
1872/*
1873 *  If an attempt was made to configure POSIX objects and
1874 *  the POSIX API was not configured into RTEMS, error out.
1875 */
1876#if !defined(RTEMS_POSIX_API)
1877  #if ((CONFIGURE_MAXIMUM_POSIX_THREADS != 0) || \
1878       (CONFIGURE_MAXIMUM_POSIX_MUTEXES != 0) || \
1879       (CONFIGURE_MAXIMUM_POSIX_CONDITION_VARIABLES != 0) || \
1880       (CONFIGURE_MAXIMUM_POSIX_KEYS != 0) || \
1881       (CONFIGURE_MAXIMUM_POSIX_TIMERS != 0) || \
1882       (CONFIGURE_MAXIMUM_POSIX_QUEUED_SIGNALS != 0) || \
1883       (CONFIGURE_MAXIMUM_POSIX_MESSAGE_QUEUES != 0) || \
1884       (CONFIGURE_MAXIMUM_POSIX_SEMAPHORES != 0) || \
1885       (CONFIGURE_MAXIMUM_POSIX_BARRIERS != 0) || \
1886       (CONFIGURE_MAXIMUM_POSIX_SPINLOCKS != 0) || \
1887       (CONFIGURE_MAXIMUM_POSIX_RWLOCKS != 0) || \
1888      defined(CONFIGURE_POSIX_INIT_THREAD_TABLE))
1889  #error "CONFIGURATION ERROR: POSIX API support not configured!!"
1890  #endif
1891#endif
1892
1893/*
1894 *  If an attempt was made to configure ITRON objects and
1895 *  the ITRON API was not configured into RTEMS, error out.
1896 */
1897#if !defined(RTEMS_ITRON_API)
1898  #if ((CONFIGURE_MAXIMUM_ITRON_TASKS != 0) || \
1899       (CONFIGURE_MAXIMUM_ITRON_SEMAPHORES != 0) || \
1900       (CONFIGURE_MAXIMUM_ITRON_EVENTFLAGS != 0) || \
1901       (CONFIGURE_MAXIMUM_ITRON_MAILBOXES != 0) || \
1902       (CONFIGURE_MAXIMUM_ITRON_MESSAGE_BUFFERS != 0) || \
1903       (CONFIGURE_MAXIMUM_ITRON_PORTS != 0) || \
1904       (CONFIGURE_MAXIMUM_ITRON_MEMORY_POOLS != 0) || \
1905       (CONFIGURE_MAXIMUM_ITRON_FIXED_MEMORY_POOLS != 0) || \
1906      defined(CONFIGURE_ITRON_INIT_TASK_TABLE))
1907  #error "CONFIGURATION ERROR: ITRON API support not configured!!"
1908  #endif
1909#endif
1910
1911/*
1912 *  You must either explicity include or exclude the clock driver.
1913 *  It is such a common newbie error to leave it out.  Maybe this
1914 *  will put an end to it.
1915 * 
1916 *  NOTE: If you are using the timer driver, it is considered
1917 *        mutually exclusive with the clock driver because the
1918 *        drivers are assumed to use the same "timer" hardware
1919 *        on many boards.
1920 */
1921#if !defined(CONFIGURE_HAS_OWN_DEVICE_DRIVER_TABLE)
1922  #if !defined(CONFIGURE_APPLICATION_NEEDS_CLOCK_DRIVER) && \
1923      !defined(CONFIGURE_APPLICATION_DOES_NOT_NEED_CLOCK_DRIVER) && \
1924      !defined(CONFIGURE_APPLICATION_NEEDS_TIMER_DRIVER)
1925    #error "CONFIGURATION ERROR: Do you want the clock driver or not?!?"
1926   #endif
1927#endif
1928
1929/*
1930 *  These names have been obsoleted so make the user application stop compiling
1931 */
1932#if defined(CONFIGURE_TEST_NEEDS_TIMER_DRIVER) || \
1933    defined(CONFIGURE_TEST_NEEDS_CONSOLE_DRIVER) || \
1934    defined(CONFIGURE_TEST_NEEDS_CLOCK_DRIVER) || \
1935    defined(CONFIGURE_TEST_NEEDS_RTC_DRIVER) || \
1936    defined(CONFIGURE_TEST_NEEDS_STUB_DRIVER)
1937#error "CONFIGURATION ERROR: CONFIGURE_TEST_XXX constants are obsolete"
1938#endif
1939
1940/*
1941 *  Validate the configured maximum priority
1942 */
1943#if ((CONFIGURE_MAXIMUM_PRIORITY != 3) && \
1944     (CONFIGURE_MAXIMUM_PRIORITY != 7) && \
1945     (CONFIGURE_MAXIMUM_PRIORITY != 15) && \
1946     (CONFIGURE_MAXIMUM_PRIORITY != 31) && \
1947     (CONFIGURE_MAXIMUM_PRIORITY != 63) && \
1948     (CONFIGURE_MAXIMUM_PRIORITY != 127) && \
1949     (CONFIGURE_MAXIMUM_PRIORITY != 255))
1950  #error "Maximum priority is not 1 less than a power of 2 between 4 and 256"
1951#endif
1952   
1953#if (CONFIGURE_MAXIMUM_PRIORITY > PRIORITY_DEFAULT_MAXIMUM)
1954  #error "Maximum priority configured higher than supported by target."
1955#endif
1956
1957#endif
1958/* end of include file */
Note: See TracBrowser for help on using the repository browser.