source: rtems/c/src/exec/sapi/include/confdefs.h @ cc17eba

4.104.114.84.95
Last change on this file since cc17eba was cc17eba, checked in by Joel Sherrill <joel.sherrill@…>, on Jul 9, 1999 at 4:56:34 PM

Make sure pthread init stack size is always set.

  • Property mode set to 100644
File size: 19.0 KB
Line 
1/*  confdefs.h
2 *
3 *  This include file contains the configuration table template that will
4 *  be used by the single processor tests to define its default configuration
5 *  parameters.
6 *
7 *  COPYRIGHT (c) 1989-1998.
8 *  On-Line Applications Research Corporation (OAR).
9 *  Copyright assigned to U.S. Government, 1994.
10 *
11 *  The license and distribution terms for this file may be
12 *  found in the file LICENSE in this distribution or at
13 *  http://www.OARcorp.com/rtems/license.html.
14 *
15 *  $Id$
16 */
17
18#ifndef __CONFIGURATION_TEMPLATE_h
19#define __CONFIGURATION_TEMPLATE_h
20 
21#ifdef __cplusplus
22extern "C" {
23#endif
24 
25extern rtems_initialization_tasks_table Initialization_tasks[];
26extern rtems_driver_address_table       Device_drivers[];
27extern rtems_configuration_table        Configuration;
28extern rtems_multiprocessing_table      Multiprocessing_configuration;
29#ifdef RTEMS_POSIX_API
30extern posix_api_configuration_table    Configuration_POSIX_API;
31#endif
32
33/*
34 *  RTEMS C Library and Newlib support
35 *
36 *  NOTE:  This ends up defining these even when newlib is not used.
37 */
38
39#define CONFIGURE_NEWLIB_EXTENSION 1
40#define CONFIGURE_MALLOC_REGION 1
41
42#ifndef CONFIGURE_LIBIO_MAXIMUM_FILE_DESCRIPTORS
43#define CONFIGURE_LIBIO_MAXIMUM_FILE_DESCRIPTORS 20
44#endif
45
46#define CONFIGURE_LIBIO_SEMAPHORES \
47  (CONFIGURE_LIBIO_MAXIMUM_FILE_DESCRIPTORS + 1)
48
49#ifdef CONFIGURE_INIT
50unsigned32 rtems_libio_number_iops = CONFIGURE_LIBIO_MAXIMUM_FILE_DESCRIPTORS;
51#endif
52
53/*
54 *  Stack Checker Requirements
55 */
56
57#ifdef STACK_CHECKER_ON
58#define CONFIGURE_STACK_CHECKER_EXTENSION 1
59#else
60#define CONFIGURE_STACK_CHECKER_EXTENSION 0
61#endif
62
63/*
64 *  Interrupt Stack Space
65 */
66
67#if (CPU_ALLOCATE_INTERRUPT_STACK == 0)
68#define CONFIGURE_INTERRUPT_STACK_MEMORY 0
69#else
70  #ifndef CONFIGURE_INTERRUPT_STACK_MEMORY
71  #define CONFIGURE_INTERRUPT_STACK_MEMORY RTEMS_MINIMUM_STACK_SIZE
72  #else
73  #define CONFIGURE_INTERRUPT_STACK_MEMORY 0
74  #endif
75#endif
76
77/*
78 *  Default User Initialization Task Table.  This table guarantees that
79 *  one user initialization table is defined.
80 */
81
82#ifdef CONFIGURE_RTEMS_INIT_TASKS_TABLE
83
84#ifdef CONFIGURE_HAS_OWN_INIT_TASK_TABLE
85
86/*
87 *  The user is defining their own table information and setting the
88 *  appropriate variables.
89 */
90
91#else
92
93#ifndef CONFIGURE_INIT_TASK_NAME
94#define CONFIGURE_INIT_TASK_NAME          rtems_build_name( 'U', 'I', '1', ' ' )
95#endif
96
97#ifndef CONFIGURE_INIT_TASK_STACK_SIZE
98#define CONFIGURE_INIT_TASK_STACK_SIZE    RTEMS_MINIMUM_STACK_SIZE
99#endif
100
101#ifndef CONFIGURE_INIT_TASK_PRIORITY
102#define CONFIGURE_INIT_TASK_PRIORITY      1
103#endif
104
105#ifndef CONFIGURE_INIT_TASK_ATTRIBUTES
106#define CONFIGURE_INIT_TASK_ATTRIBUTES    RTEMS_DEFAULT_ATTRIBUTES
107#endif
108
109#ifndef CONFIGURE_INIT_TASK_ENTRY_POINT
110#define CONFIGURE_INIT_TASK_ENTRY_POINT   Init
111#endif
112
113#ifndef CONFIGURE_INIT_TASK_INITIAL_MODES
114#define CONFIGURE_INIT_TASK_INITIAL_MODES RTEMS_NO_PREEMPT
115#endif
116
117#ifndef CONFIGURE_INIT_TASK_ARGUMENTS
118#define CONFIGURE_INIT_TASK_ARGUMENTS     0
119#endif
120
121#ifdef CONFIGURE_INIT
122rtems_initialization_tasks_table Initialization_tasks[] = {
123  { CONFIGURE_INIT_TASK_NAME,
124    CONFIGURE_INIT_TASK_STACK_SIZE,
125    CONFIGURE_INIT_TASK_PRIORITY,
126    CONFIGURE_INIT_TASK_ATTRIBUTES,
127    CONFIGURE_INIT_TASK_ENTRY_POINT,
128    CONFIGURE_INIT_TASK_INITIAL_MODES,
129    CONFIGURE_INIT_TASK_ARGUMENTS
130  }
131};
132#endif
133
134#define CONFIGURE_INIT_TASK_TABLE Initialization_tasks
135
136#define CONFIGURE_INIT_TASK_TABLE_SIZE \
137  sizeof(CONFIGURE_INIT_TASK_TABLE) / sizeof(rtems_initialization_tasks_table)
138
139#endif    /* CONFIGURE_HAS_OWN_INIT_TASK_TABLE */
140
141#else     /* CONFIGURE_RTEMS_INIT_TASKS_TABLE */
142
143#define CONFIGURE_INIT_TASK_TABLE      NULL
144#define CONFIGURE_INIT_TASK_TABLE_SIZE 0
145
146#endif
147
148/*
149 *  Default Device Driver Table.  Each driver needed by the test is explicitly
150 *  choosen by that test.  There is always a null driver entry.
151 */
152
153#define NULL_DRIVER_TABLE_ENTRY \
154 { NULL, NULL, NULL, NULL, NULL, NULL }
155
156#ifdef CONFIGURE_TEST_NEEDS_TIMER_DRIVER
157#include <timerdrv.h>
158#endif
159
160#ifdef CONFIGURE_TEST_NEEDS_STUB_DRIVER
161#include <stubdrv.h>
162#endif
163
164#ifndef CONFIGURE_HAS_OWN_DEVICE_DRIVER_TABLE
165
166#ifdef CONFIGURE_INIT
167rtems_driver_address_table Device_drivers[] = {
168#ifdef CONFIGURE_TEST_NEEDS_CONSOLE_DRIVER
169  CONSOLE_DRIVER_TABLE_ENTRY,
170#endif
171#ifdef CONFIGURE_TEST_NEEDS_CLOCK_DRIVER
172  CLOCK_DRIVER_TABLE_ENTRY,
173#endif
174#ifdef CONFIGURE_TEST_NEEDS_STUB_DRIVER
175  STUB_DRIVER_TABLE_ENTRY,
176#endif
177  NULL_DRIVER_TABLE_ENTRY
178};
179#endif
180
181#endif  /* CONFIGURE_HAS_OWN_DEVICE_DRIVER_TABLE */
182
183/*
184 *  Default the number of devices per device driver.  This value may be
185 *  overridden by the user.
186 */
187
188#ifndef CONFIGURE_HAS_OWN_NUMBER_OF_DEVICES
189
190#ifndef CONFIGURE_MAXIMUM_DEVICES
191#define CONFIGURE_MAXIMUM_DEVICES   20
192#endif
193
194#endif /* CONFIGURE_HAS_OWN_NUMBER_OF_DEVICES */
195
196/*
197 *  Default Configuration Table.  This table contains the most values set in
198 *  the RTEMS Test Suite.  Each value may be overridden within each test to
199 *  customize the environment.
200 */
201
202#ifdef CONFIGURE_MPTEST
203#ifndef CONFIGURE_HAS_OWN_MULTIPROCESING_TABLE
204
205#ifndef CONFIGURE_MP_NODE_NUMBER
206#define CONFIGURE_MP_NODE_NUMBER                NODE_NUMBER
207#endif
208
209#ifndef CONFIGURE_MP_MAXIMUM_NODES
210#define CONFIGURE_MP_MAXIMUM_NODES              2
211#endif
212
213#ifndef CONFIGURE_MP_MAXIMUM_GLOBAL_OBJECTS
214#define CONFIGURE_MP_MAXIMUM_GLOBAL_OBJECTS     32
215#endif
216
217#ifndef CONFIGURE_MP_MAXIMUM_PROXIES
218#define CONFIGURE_MP_MAXIMUM_PROXIES            32
219#endif
220
221#ifndef CONFIGURE_MP_MPCI_TABLE_POINTER
222#include <mpci.h>
223#define CONFIGURE_MP_MPCI_TABLE_POINTER         &MPCI_table
224#endif
225
226#ifdef CONFIGURE_INIT
227rtems_multiprocessing_table Multiprocessing_configuration = {
228  CONFIGURE_MP_NODE_NUMBER,              /* local node number */
229  CONFIGURE_MP_MAXIMUM_NODES,            /* maximum # nodes in system */
230  CONFIGURE_MP_MAXIMUM_GLOBAL_OBJECTS,   /* maximum # global objects */
231  CONFIGURE_MP_MAXIMUM_PROXIES,          /* maximum # proxies */
232  CONFIGURE_MP_MPCI_TABLE_POINTER        /* pointer to MPCI config table */
233};
234#endif
235
236#define CONFIGURE_MULTIPROCESSING_TABLE    &Multiprocessing_configuration
237
238#endif /* CONFIGURE_HAS_OWN_MULTIPROCESING_TABLE */
239
240#else
241
242#define CONFIGURE_MULTIPROCESSING_TABLE    NULL
243
244#endif /* CONFIGURE_MPTEST */
245 
246/*
247 *  Default Configuration Table.  This table contains the most values set in
248 *  the RTEMS Test Suite.  Each value may be overridden within each test to
249 *  customize the environment.
250 */
251
252#ifndef CONFIGURE_HAS_OWN_CONFIGURATION_TABLE
253 
254#ifndef CONFIGURE_EXECUTIVE_RAM_WORK_AREA
255#define CONFIGURE_EXECUTIVE_RAM_WORK_AREA     NULL
256#endif
257
258#ifndef CONFIGURE_MAXIMUM_TASKS
259#define CONFIGURE_MAXIMUM_TASKS               10
260#endif
261
262#ifndef CONFIGURE_MAXIMUM_TIMERS
263#define CONFIGURE_MAXIMUM_TIMERS              0
264#endif
265
266#ifndef CONFIGURE_MAXIMUM_SEMAPHORES
267#define CONFIGURE_MAXIMUM_SEMAPHORES          0
268#endif
269
270#ifndef CONFIGURE_MAXIMUM_MESSAGE_QUEUES
271#define CONFIGURE_MAXIMUM_MESSAGE_QUEUES      0
272#endif
273
274#ifndef CONFIGURE_MAXIMUM_PARTITIONS
275#define CONFIGURE_MAXIMUM_PARTITIONS          0
276#endif
277
278#ifndef CONFIGURE_MAXIMUM_REGIONS
279#define CONFIGURE_MAXIMUM_REGIONS             0
280#endif
281
282#ifndef CONFIGURE_MAXIMUM_PORTS
283#define CONFIGURE_MAXIMUM_PORTS               0
284#endif
285
286#ifndef CONFIGURE_MAXIMUM_PERIODS
287#define CONFIGURE_MAXIMUM_PERIODS             0
288#endif
289
290#ifndef CONFIGURE_MAXIMUM_USER_EXTENSIONS
291#define CONFIGURE_MAXIMUM_USER_EXTENSIONS     0
292#endif
293
294#ifndef CONFIGURE_MICROSECONDS_PER_TICK
295#define CONFIGURE_MICROSECONDS_PER_TICK RTEMS_MILLISECONDS_TO_MICROSECONDS(10)
296#endif
297
298#ifndef CONFIGURE_TICKS_PER_TIMESLICE
299#define CONFIGURE_TICKS_PER_TIMESLICE        50
300#endif
301
302/*
303 *  Initial Extension Set
304 */
305
306#ifdef CONFIGURE_INIT
307#ifdef STACK_CHECKER_ON
308#include <rtems/stackchk.h>
309#endif
310
311rtems_extensions_table Configuration_Initial_Extensions[] = {
312#ifdef CONFIGURE_INITIAL_EXTENSIONS
313    CONFIGURE_INITIAL_EXTENSIONS,
314#endif
315#ifdef STACK_CHECKER_ON
316    STACK_CHECKER_EXTENSION,
317#endif
318    { NULL, NULL, NULL, NULL, NULL, NULL, NULL }
319};
320
321#define CONFIGURE_NUMBER_OF_INITIAL_EXTENSIONS \
322  ((sizeof(Configuration_Initial_Extensions) / \
323    sizeof(rtems_extensions_table)) - 1)
324
325#endif
326
327/*
328 *  POSIX API Configuration Parameters
329 */
330
331#ifdef RTEMS_POSIX_API
332
333#include <sys/types.h>
334#include <rtems/posix/cond.h>
335#include <rtems/posix/mutex.h>
336#include <rtems/posix/key.h>
337#include <rtems/posix/psignal.h>
338#include <rtems/posix/threadsup.h>
339
340#ifndef CONFIGURE_MAXIMUM_POSIX_THREADS
341#define CONFIGURE_MAXIMUM_POSIX_THREADS      10
342#endif
343
344#ifndef CONFIGURE_MAXIMUM_POSIX_MUTEXES
345#define CONFIGURE_MAXIMUM_POSIX_MUTEXES      0
346#endif
347
348#ifndef CONFIGURE_MAXIMUM_POSIX_CONDITION_VARIABLES
349#define CONFIGURE_MAXIMUM_POSIX_CONDITION_VARIABLES  0
350#endif
351
352#ifndef CONFIGURE_MAXIMUM_POSIX_KEYS
353#define CONFIGURE_MAXIMUM_POSIX_KEYS         0
354#endif
355
356#ifndef CONFIGURE_MAXIMUM_POSIX_TIMERS
357#define CONFIGURE_MAXIMUM_POSIX_TIMERS 0
358#endif
359
360#ifndef CONFIGURE_MAXIMUM_POSIX_QUEUED_SIGNALS
361#define CONFIGURE_MAXIMUM_POSIX_QUEUED_SIGNALS 0
362#endif
363
364#ifdef CONFIGURE_POSIX_INIT_THREAD_TABLE
365
366#ifdef CONFIGURE_POSIX_HAS_OWN_INIT_THREAD_TABLE
367
368/*
369 *  The user is defining their own table information and setting the
370 *  appropriate variables.
371 */
372 
373#else
374
375#ifndef CONFIGURE_POSIX_INIT_THREAD_ENTRY_POINT
376#define CONFIGURE_POSIX_INIT_THREAD_ENTRY_POINT   POSIX_Init
377#endif
378
379#ifndef CONFIGURE_POSIX_INIT_TASK_STACK_SIZE
380#define CONFIGURE_POSIX_INIT_TASK_STACK_SIZE    (RTEMS_MINIMUM_STACK_SIZE * 2)
381#endif
382
383#ifdef CONFIGURE_INIT
384posix_initialization_threads_table POSIX_Initialization_threads[] = {
385  { CONFIGURE_POSIX_INIT_THREAD_ENTRY_POINT, \
386      CONFIGURE_POSIX_INIT_TASK_STACK_SIZE }
387};
388#endif
389
390#define CONFIGURE_POSIX_INIT_THREAD_TABLE_NAME POSIX_Initialization_threads
391 
392#define CONFIGURE_POSIX_INIT_THREAD_TABLE_SIZE \
393  sizeof(CONFIGURE_POSIX_INIT_THREAD_TABLE_NAME) / \
394      sizeof(posix_initialization_threads_table)
395
396#endif    /* CONFIGURE_POSIX_HAS_OWN_INIT_TASK_TABLE */
397
398#else     /* CONFIGURE_POSIX_INIT_THREAD_TABLE */
399
400#define CONFIGURE_POSIX_INIT_THREAD_TABLE_NAME NULL
401#define CONFIGURE_POSIX_INIT_THREAD_TABLE_SIZE 0
402
403#endif
404
405#define CONFIGURE_MEMORY_PER_TASK_FOR_POSIX_API \
406  ( \
407    sizeof (POSIX_API_Control) + \
408   (sizeof (void *) * (CONFIGURE_GNAT_KEYS + CONFIGURE_MAXIMUM_POSIX_KEYS)) \
409  )
410
411#define CONFIGURE_MEMORY_FOR_POSIX_MUTEXES(_mutexes) \
412  ((_mutexes) * \
413   ( sizeof(POSIX_Mutex_Control) + CONFIGURE_OBJECT_TABLE_STUFF ) )
414
415#define CONFIGURE_MEMORY_FOR_POSIX_CONDITION_VARIABLES(_condition_variables) \
416  ((_condition_variables) * \
417   ( sizeof(POSIX_Condition_variables_Control) + \
418        CONFIGURE_OBJECT_TABLE_STUFF ) )
419
420#define CONFIGURE_MEMORY_FOR_POSIX_KEYS(_keys) \
421  ((_keys) * \
422   ( sizeof(POSIX_Keys_Control) + CONFIGURE_OBJECT_TABLE_STUFF ) )
423
424#define CONFIGURE_MEMORY_FOR_POSIX_TIMERS(_timers) \
425  ((_timers) * \
426   ( 0 ) )
427
428#define CONFIGURE_MEMORY_FOR_POSIX_QUEUED_SIGNALS(_queued_signals) \
429  ((_queued_signals) * \
430   ( sizeof(POSIX_signals_Siginfo_node) + CONFIGURE_OBJECT_TABLE_STUFF ) )
431
432 
433
434#define CONFIGURE_MEMORY_FOR_POSIX \
435  ( \
436    CONFIGURE_MEMORY_FOR_POSIX_MUTEXES( CONFIGURE_MAXIMUM_POSIX_MUTEXES ) + \
437    CONFIGURE_MEMORY_FOR_POSIX_CONDITION_VARIABLES( \
438        CONFIGURE_MAXIMUM_POSIX_CONDITION_VARIABLES ) + \
439    CONFIGURE_MEMORY_FOR_POSIX_KEYS( CONFIGURE_MAXIMUM_POSIX_KEYS ) + \
440    CONFIGURE_MEMORY_FOR_POSIX_QUEUED_SIGNALS( \
441        CONFIGURE_MAXIMUM_POSIX_QUEUED_SIGNALS ) + \
442    (CONFIGURE_POSIX_INIT_TASK_STACK_SIZE) \
443   )
444
445
446#else
447
448#define CONFIGURE_MAXIMUM_POSIX_THREADS         0
449#define CONFIGURE_MEMORY_PER_TASK_FOR_POSIX_API 0
450#define CONFIGURE_MEMORY_FOR_POSIX              0
451
452
453#endif    /* RTEMS_POSIX_API */
454
455#ifndef CONFIGURE_POSIX_INIT_TASK_STACK_SIZE
456#define CONFIGURE_POSIX_INIT_TASK_STACK_SIZE    0
457#endif
458
459/*
460 *  Calculate the RAM size based on the maximum number of objects configured.
461 *  The model is to estimate the memory required for each configured item,
462 *  sum the memory requirements and insure that there is at least 32K greater
463 *  than that for things not directly addressed such as:
464 *
465 *    + stacks greater than minimum size
466 *    + FP contexts
467 *    + API areas (should be optional)
468 *    + messages
469 *    + object name and local pointer table overhead
470 *    + per node memory requirements
471 *    + executive fixed requirements (including at least internal threads
472 *       and the Ready chains)
473 *
474 *  NOTE:  Eventually this should take into account some of the above.
475 *         Basically, this is a "back of the envelope" estimate for
476 *         memory requirements.  It could be more accurate.
477 */
478
479#ifndef CONFIGURE_EXECUTIVE_RAM_SIZE
480
481#define CONFIGURE_OBJECT_TABLE_STUFF \
482  ( sizeof(Objects_Control *) + sizeof(rtems_name *) + sizeof(rtems_name) )
483
484#define CONFIGURE_MEMORY_FOR_TASKS(_tasks) \
485  (((_tasks) + 1 ) * \
486   ((sizeof(Thread_Control) + CONTEXT_FP_SIZE + \
487      STACK_MINIMUM_SIZE + sizeof( RTEMS_API_Control ) + \
488      CONFIGURE_MEMORY_PER_TASK_FOR_POSIX_API + \
489      CONFIGURE_OBJECT_TABLE_STUFF)) \
490  )
491
492#define CONFIGURE_MEMORY_FOR_TIMERS(_timers) \
493  ((_timers) * ( sizeof(Timer_Control) + CONFIGURE_OBJECT_TABLE_STUFF ) )
494
495#define CONFIGURE_MEMORY_FOR_SEMAPHORES(_semaphores) \
496  ((_semaphores) * \
497   ( sizeof(Semaphore_Control) + CONFIGURE_OBJECT_TABLE_STUFF ) )
498
499#define CONFIGURE_MEMORY_FOR_MESSAGE_QUEUES(_queues) \
500  ( (_queues) * \
501    ( sizeof(Message_queue_Control) + CONFIGURE_OBJECT_TABLE_STUFF ) )
502
503#define CONFIGURE_MEMORY_FOR_PARTITIONS(_partitions) \
504  ( (_partitions) * \
505    ( sizeof(Partition_Control) + CONFIGURE_OBJECT_TABLE_STUFF ) )
506
507#define CONFIGURE_MEMORY_FOR_REGIONS(_regions) \
508  ( (_regions) * \
509    ( sizeof(Region_Control) + CONFIGURE_OBJECT_TABLE_STUFF ) )
510
511#define CONFIGURE_MEMORY_FOR_PORTS(_ports) \
512  ( (_ports) * \
513    ( sizeof(Dual_ported_memory_Control) + CONFIGURE_OBJECT_TABLE_STUFF ) )
514
515#define CONFIGURE_MEMORY_FOR_PERIODS(_periods) \
516  ( (_periods) * \
517    ( sizeof(Rate_monotonic_Control) + CONFIGURE_OBJECT_TABLE_STUFF ) )
518
519#define CONFIGURE_MEMORY_FOR_USER_EXTENSIONS(_extensions) \
520  ( (_extensions) * \
521    ( sizeof(Extension_Control) + CONFIGURE_OBJECT_TABLE_STUFF ) )
522
523#define CONFIGURE_MEMORY_FOR_DEVICES(_devices) \
524  (((_devices) + 1) * ( sizeof(rtems_driver_name_t) ) )
525
526#ifdef CONFIGURE_MPTEST
527
528#ifndef CONFIGURE_HAS_OWN_MULTIPROCESING_TABLE
529
530#define CONFIGURE_MEMORY_FOR_PROXIES(_proxies) \
531  ( ((_proxies) + 1) * ( sizeof(Thread_Proxy_control) )  )
532
533#define CONFIGURE_MEMORY_FOR_GLOBAL_OBJECTS(_global_objects) \
534  ((_global_objects)  * ( sizeof(Objects_MP_Control) )  )
535
536#define CONFIGURE_MEMORY_FOR_MP \
537  ( CONFIGURE_MEMORY_FOR_PROXIES(CONFIGURE_MP_MAXIMUM_PROXIES) + \
538    CONFIGURE_MEMORY_FOR_GLOBAL_OBJECTS(CONFIGURE_MP_MAXIMUM_GLOBAL_OBJECTS) + \
539    CONFIGURE_MEMORY_FOR_TASKS(1) \
540  )
541
542#endif  /* CONFIGURE_HAS_OWN_MULTIPROCESING_TABLE */
543
544#else
545
546#define CONFIGURE_MEMORY_FOR_MP  0
547
548#endif
549
550#ifndef CONFIGURE_MEMORY_OVERHEAD
551#define CONFIGURE_MEMORY_OVERHEAD 0
552#endif
553
554#ifndef CONFIGURE_EXTRA_TASK_STACKS
555#define CONFIGURE_EXTRA_TASK_STACKS 0
556#endif
557
558#define CONFIGURE_MEMORY_FOR_SYSTEM_OVEREHAD \
559  ( CONFIGURE_MEMORY_FOR_TASKS(1) +    /* IDLE */ \
560    (256 * 12) +                       /* Ready chains */ \
561    256        +                       /* name/ptr table overhead */ \
562    CONFIGURE_INTERRUPT_STACK_MEMORY   /* interrupt stack */ \
563  )
564
565#define CONFIGURE_EXECUTIVE_RAM_SIZE \
566(( CONFIGURE_MEMORY_FOR_POSIX + \
567   CONFIGURE_MEMORY_FOR_TASKS(CONFIGURE_MAXIMUM_TASKS + \
568      CONFIGURE_MAXIMUM_POSIX_THREADS + CONFIGURE_MAXIMUM_ADA_TASKS ) + \
569   CONFIGURE_MEMORY_FOR_TIMERS(CONFIGURE_MAXIMUM_TIMERS) + \
570   CONFIGURE_MEMORY_FOR_SEMAPHORES(CONFIGURE_MAXIMUM_SEMAPHORES + \
571     CONFIGURE_LIBIO_SEMAPHORES) + \
572   CONFIGURE_MEMORY_FOR_MESSAGE_QUEUES(CONFIGURE_MAXIMUM_MESSAGE_QUEUES) + \
573   CONFIGURE_MEMORY_FOR_PARTITIONS(CONFIGURE_MAXIMUM_PARTITIONS) + \
574   CONFIGURE_MEMORY_FOR_REGIONS( \
575      CONFIGURE_MAXIMUM_REGIONS + CONFIGURE_MALLOC_REGION ) + \
576   CONFIGURE_MEMORY_FOR_PORTS(CONFIGURE_MAXIMUM_PORTS) + \
577   CONFIGURE_MEMORY_FOR_PERIODS(CONFIGURE_MAXIMUM_PERIODS) + \
578   CONFIGURE_MEMORY_FOR_USER_EXTENSIONS( \
579      CONFIGURE_MAXIMUM_USER_EXTENSIONS + CONFIGURE_NEWLIB_EXTENSION + \
580      CONFIGURE_STACK_CHECKER_EXTENSION ) + \
581   CONFIGURE_MEMORY_FOR_DEVICES(CONFIGURE_MAXIMUM_DEVICES) + \
582   CONFIGURE_MEMORY_FOR_MP + \
583   CONFIGURE_MEMORY_FOR_SYSTEM_OVEREHAD + \
584   (((CONFIGURE_MEMORY_OVERHEAD)+1) * 1024) + \
585   (CONFIGURE_EXTRA_TASK_STACKS) + (CONFIGURE_ADA_TASKS_STACK) \
586) & 0xfffffc00)
587#endif
588
589#ifdef CONFIGURE_GNAT_RTEMS
590#define CONFIGURE_GNAT_MUTEXES 10
591#define CONFIGURE_GNAT_KEYS    1
592
593/* 20 are required to run all tests in the ACVC */
594#ifndef CONFIGURE_MAXIMUM_ADA_TASKS
595#define CONFIGURE_MAXIMUM_ADA_TASKS  20
596#endif
597
598/* This is the number of non-Ada tasks which invoked Ada code. */
599#ifndef CONFIGURE_MAXIMUM_FAKE_ADA_TASKS
600#define CONFIGURE_MAXIMUM_FAKE_ADA_TASKS 0
601#endif
602
603/* Ada tasks are allocated twice the minimum stack space */
604#define CONFIGURE_ADA_TASKS_STACK \
605  (CONFIGURE_MAXIMUM_ADA_TASKS * (RTEMS_MINIMUM_STACK_SIZE + (6 * 1024)))
606
607#else
608#define CONFIGURE_GNAT_MUTEXES           0
609#define CONFIGURE_GNAT_KEYS              0
610#define CONFIGURE_MAXIMUM_ADA_TASKS      0
611#define CONFIGURE_MAXIMUM_FAKE_ADA_TASKS 0
612#define CONFIGURE_ADA_TASKS_STACK        0
613#endif
614
615
616#ifdef CONFIGURE_INIT
617
618rtems_api_configuration_table Configuration_RTEMS_API = {
619  CONFIGURE_MAXIMUM_TASKS,
620  CONFIGURE_MAXIMUM_TIMERS,
621  CONFIGURE_MAXIMUM_SEMAPHORES + CONFIGURE_LIBIO_SEMAPHORES,
622  CONFIGURE_MAXIMUM_MESSAGE_QUEUES,
623  CONFIGURE_MAXIMUM_PARTITIONS,
624  CONFIGURE_MAXIMUM_REGIONS + CONFIGURE_MALLOC_REGION,
625  CONFIGURE_MAXIMUM_PORTS,
626  CONFIGURE_MAXIMUM_PERIODS,
627  CONFIGURE_INIT_TASK_TABLE_SIZE,
628  CONFIGURE_INIT_TASK_TABLE
629};
630
631#ifdef RTEMS_POSIX_API
632posix_api_configuration_table Configuration_POSIX_API = {
633  CONFIGURE_MAXIMUM_POSIX_THREADS + CONFIGURE_MAXIMUM_ADA_TASKS,
634  CONFIGURE_MAXIMUM_POSIX_MUTEXES + CONFIGURE_GNAT_MUTEXES +
635    CONFIGURE_MAXIMUM_ADA_TASKS + CONFIGURE_MAXIMUM_FAKE_ADA_TASKS,
636  CONFIGURE_MAXIMUM_POSIX_CONDITION_VARIABLES +
637    CONFIGURE_MAXIMUM_ADA_TASKS + CONFIGURE_MAXIMUM_FAKE_ADA_TASKS,
638  CONFIGURE_MAXIMUM_POSIX_KEYS + CONFIGURE_GNAT_KEYS,
639  CONFIGURE_MAXIMUM_POSIX_TIMERS,
640  CONFIGURE_MAXIMUM_POSIX_QUEUED_SIGNALS,
641  CONFIGURE_POSIX_INIT_THREAD_TABLE_SIZE,
642  CONFIGURE_POSIX_INIT_THREAD_TABLE_NAME
643};
644#endif
645
646rtems_configuration_table Configuration = {
647  CONFIGURE_EXECUTIVE_RAM_WORK_AREA,
648  CONFIGURE_EXECUTIVE_RAM_SIZE,
649  CONFIGURE_MAXIMUM_USER_EXTENSIONS + CONFIGURE_NEWLIB_EXTENSION + 
650      CONFIGURE_STACK_CHECKER_EXTENSION,
651  CONFIGURE_MICROSECONDS_PER_TICK,
652  CONFIGURE_TICKS_PER_TIMESLICE,
653  CONFIGURE_MAXIMUM_DEVICES,
654  sizeof (Device_drivers)/
655    sizeof(rtems_driver_address_table),      /* number of device drivers */
656  Device_drivers,                            /* pointer to driver table */
657  CONFIGURE_NUMBER_OF_INITIAL_EXTENSIONS,    /* number of initial extensions */
658  Configuration_Initial_Extensions,          /* pointer to initial extensions */
659  CONFIGURE_MULTIPROCESSING_TABLE,           /* pointer to MP config table */
660  &Configuration_RTEMS_API,                  /* pointer to RTEMS API config */
661#ifdef RTEMS_POSIX_API
662  &Configuration_POSIX_API                   /* pointer to POSIX API config */
663#else
664  NULL                                       /* pointer to POSIX API config */
665#endif
666};
667#endif
668
669#endif /* CONFIGURE_HAS_OWN_CONFIGURATION_TABLE */
670
671#ifdef __cplusplus
672}
673#endif
674 
675#endif
676/* end of include file */
Note: See TracBrowser for help on using the repository browser.