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

4.104.114.84.95
Last change on this file since 0747e2d was 0747e2d, checked in by Joel Sherrill <joel.sherrill@…>, on Feb 3, 1999 at 4:22:18 PM

POSIX Timers submitted by Juan Zamorano Flores
<jzamora@…>.

  • Property mode set to 100644
File size: 18.7 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#ifdef CONFIGURE_INIT
380posix_initialization_threads_table POSIX_Initialization_threads[] = {
381  { CONFIGURE_POSIX_INIT_THREAD_ENTRY_POINT }
382};
383#endif
384
385#define CONFIGURE_POSIX_INIT_THREAD_TABLE_NAME POSIX_Initialization_threads
386 
387#define CONFIGURE_POSIX_INIT_THREAD_TABLE_SIZE \
388  sizeof(CONFIGURE_POSIX_INIT_THREAD_TABLE_NAME) / \
389      sizeof(posix_initialization_threads_table)
390
391#endif    /* CONFIGURE_POSIX_HAS_OWN_INIT_TASK_TABLE */
392
393#else     /* CONFIGURE_POSIX_INIT_THREAD_TABLE */
394
395#define CONFIGURE_POSIX_INIT_THREAD_TABLE_NAME NULL
396#define CONFIGURE_POSIX_INIT_THREAD_TABLE_SIZE 0
397
398#endif
399
400#define CONFIGURE_MEMORY_PER_TASK_FOR_POSIX_API \
401  ( \
402    sizeof (POSIX_API_Control) + \
403   (sizeof (void *) * (CONFIGURE_GNAT_KEYS + CONFIGURE_MAXIMUM_POSIX_KEYS)) \
404  )
405
406#define CONFIGURE_MEMORY_FOR_POSIX_MUTEXES(_mutexes) \
407  ((_mutexes) * \
408   ( sizeof(POSIX_Mutex_Control) + CONFIGURE_OBJECT_TABLE_STUFF ) )
409
410#define CONFIGURE_MEMORY_FOR_POSIX_CONDITION_VARIABLES(_condition_variables) \
411  ((_condition_variables) * \
412   ( sizeof(POSIX_Condition_variables_Control) + \
413        CONFIGURE_OBJECT_TABLE_STUFF ) )
414
415#define CONFIGURE_MEMORY_FOR_POSIX_KEYS(_keys) \
416  ((_keys) * \
417   ( sizeof(POSIX_Keys_Control) + CONFIGURE_OBJECT_TABLE_STUFF ) )
418
419#define CONFIGURE_MEMORY_FOR_POSIX_TIMERS(_timers) \
420  ((_timers) * \
421   ( 0 ) )
422
423#define CONFIGURE_MEMORY_FOR_POSIX_QUEUED_SIGNALS(_queued_signals) \
424  ((_queued_signals) * \
425   ( sizeof(POSIX_signals_Siginfo_node) + CONFIGURE_OBJECT_TABLE_STUFF ) )
426
427 
428
429#define CONFIGURE_MEMORY_FOR_POSIX \
430  ( \
431    CONFIGURE_MEMORY_FOR_POSIX_MUTEXES( CONFIGURE_MAXIMUM_POSIX_MUTEXES ) + \
432    CONFIGURE_MEMORY_FOR_POSIX_CONDITION_VARIABLES( \
433        CONFIGURE_MAXIMUM_POSIX_CONDITION_VARIABLES ) + \
434    CONFIGURE_MEMORY_FOR_POSIX_KEYS( CONFIGURE_MAXIMUM_POSIX_KEYS ) + \
435    CONFIGURE_MEMORY_FOR_POSIX_QUEUED_SIGNALS( \
436        CONFIGURE_MAXIMUM_POSIX_QUEUED_SIGNALS ) \
437   )
438
439
440#else
441
442#define CONFIGURE_MAXIMUM_POSIX_THREADS         0
443#define CONFIGURE_MEMORY_PER_TASK_FOR_POSIX_API 0
444#define CONFIGURE_MEMORY_FOR_POSIX              0
445
446#endif    /* RTEMS_POSIX_API */
447
448/*
449 *  Calculate the RAM size based on the maximum number of objects configured.
450 *  The model is to estimate the memory required for each configured item,
451 *  sum the memory requirements and insure that there is at least 32K greater
452 *  than that for things not directly addressed such as:
453 *
454 *    + stacks greater than minimum size
455 *    + FP contexts
456 *    + API areas (should be optional)
457 *    + messages
458 *    + object name and local pointer table overhead
459 *    + per node memory requirements
460 *    + executive fixed requirements (including at least internal threads
461 *       and the Ready chains)
462 *
463 *  NOTE:  Eventually this should take into account some of the above.
464 *         Basically, this is a "back of the envelope" estimate for
465 *         memory requirements.  It could be more accurate.
466 */
467
468#ifndef CONFIGURE_EXECUTIVE_RAM_SIZE
469
470#define CONFIGURE_OBJECT_TABLE_STUFF \
471  ( sizeof(Objects_Control *) + sizeof(rtems_name *) + sizeof(rtems_name) )
472
473#define CONFIGURE_MEMORY_FOR_TASKS(_tasks) \
474  (((_tasks) + 1 ) * \
475   ((sizeof(Thread_Control) + CONTEXT_FP_SIZE + \
476      STACK_MINIMUM_SIZE + sizeof( RTEMS_API_Control ) + \
477      CONFIGURE_MEMORY_PER_TASK_FOR_POSIX_API + \
478      CONFIGURE_OBJECT_TABLE_STUFF)) \
479  )
480
481#define CONFIGURE_MEMORY_FOR_TIMERS(_timers) \
482  ((_timers) * ( sizeof(Timer_Control) + CONFIGURE_OBJECT_TABLE_STUFF ) )
483
484#define CONFIGURE_MEMORY_FOR_SEMAPHORES(_semaphores) \
485  ((_semaphores) * \
486   ( sizeof(Semaphore_Control) + CONFIGURE_OBJECT_TABLE_STUFF ) )
487
488#define CONFIGURE_MEMORY_FOR_MESSAGE_QUEUES(_queues) \
489  ( (_queues) * \
490    ( sizeof(Message_queue_Control) + CONFIGURE_OBJECT_TABLE_STUFF ) )
491
492#define CONFIGURE_MEMORY_FOR_PARTITIONS(_partitions) \
493  ( (_partitions) * \
494    ( sizeof(Partition_Control) + CONFIGURE_OBJECT_TABLE_STUFF ) )
495
496#define CONFIGURE_MEMORY_FOR_REGIONS(_regions) \
497  ( (_regions) * \
498    ( sizeof(Region_Control) + CONFIGURE_OBJECT_TABLE_STUFF ) )
499
500#define CONFIGURE_MEMORY_FOR_PORTS(_ports) \
501  ( (_ports) * \
502    ( sizeof(Dual_ported_memory_Control) + CONFIGURE_OBJECT_TABLE_STUFF ) )
503
504#define CONFIGURE_MEMORY_FOR_PERIODS(_periods) \
505  ( (_periods) * \
506    ( sizeof(Rate_monotonic_Control) + CONFIGURE_OBJECT_TABLE_STUFF ) )
507
508#define CONFIGURE_MEMORY_FOR_USER_EXTENSIONS(_extensions) \
509  ( (_extensions) * \
510    ( sizeof(Extension_Control) + CONFIGURE_OBJECT_TABLE_STUFF ) )
511
512#define CONFIGURE_MEMORY_FOR_DEVICES(_devices) \
513  (((_devices) + 1) * ( sizeof(rtems_driver_name_t) ) )
514
515#ifdef CONFIGURE_MPTEST
516
517#ifndef CONFIGURE_HAS_OWN_MULTIPROCESING_TABLE
518
519#define CONFIGURE_MEMORY_FOR_PROXIES(_proxies) \
520  ( ((_proxies) + 1) * ( sizeof(Thread_Proxy_control) )  )
521
522#define CONFIGURE_MEMORY_FOR_GLOBAL_OBJECTS(_global_objects) \
523  ((_global_objects)  * ( sizeof(Objects_MP_Control) )  )
524
525#define CONFIGURE_MEMORY_FOR_MP \
526  ( CONFIGURE_MEMORY_FOR_PROXIES(CONFIGURE_MP_MAXIMUM_PROXIES) + \
527    CONFIGURE_MEMORY_FOR_GLOBAL_OBJECTS(CONFIGURE_MP_MAXIMUM_GLOBAL_OBJECTS) + \
528    CONFIGURE_MEMORY_FOR_TASKS(1) \
529  )
530
531#endif  /* CONFIGURE_HAS_OWN_MULTIPROCESING_TABLE */
532
533#else
534
535#define CONFIGURE_MEMORY_FOR_MP  0
536
537#endif
538
539#ifndef CONFIGURE_MEMORY_OVERHEAD
540#define CONFIGURE_MEMORY_OVERHEAD 0
541#endif
542
543#ifndef CONFIGURE_EXTRA_TASK_STACKS
544#define CONFIGURE_EXTRA_TASK_STACKS 0
545#endif
546
547#define CONFIGURE_MEMORY_FOR_SYSTEM_OVEREHAD \
548  ( CONFIGURE_MEMORY_FOR_TASKS(1) +    /* IDLE */ \
549    (256 * 12) +                       /* Ready chains */ \
550    256        +                       /* name/ptr table overhead */ \
551    CONFIGURE_INTERRUPT_STACK_MEMORY   /* interrupt stack */ \
552  )
553
554#define CONFIGURE_EXECUTIVE_RAM_SIZE \
555(( CONFIGURE_MEMORY_FOR_POSIX + \
556   CONFIGURE_MEMORY_FOR_TASKS(CONFIGURE_MAXIMUM_TASKS + \
557      CONFIGURE_MAXIMUM_POSIX_THREADS + CONFIGURE_MAXIMUM_ADA_TASKS ) + \
558   CONFIGURE_MEMORY_FOR_TIMERS(CONFIGURE_MAXIMUM_TIMERS) + \
559   CONFIGURE_MEMORY_FOR_SEMAPHORES(CONFIGURE_MAXIMUM_SEMAPHORES + \
560     CONFIGURE_LIBIO_SEMAPHORES) + \
561   CONFIGURE_MEMORY_FOR_MESSAGE_QUEUES(CONFIGURE_MAXIMUM_MESSAGE_QUEUES) + \
562   CONFIGURE_MEMORY_FOR_PARTITIONS(CONFIGURE_MAXIMUM_PARTITIONS) + \
563   CONFIGURE_MEMORY_FOR_REGIONS( \
564      CONFIGURE_MAXIMUM_REGIONS + CONFIGURE_MALLOC_REGION ) + \
565   CONFIGURE_MEMORY_FOR_PORTS(CONFIGURE_MAXIMUM_PORTS) + \
566   CONFIGURE_MEMORY_FOR_PERIODS(CONFIGURE_MAXIMUM_PERIODS) + \
567   CONFIGURE_MEMORY_FOR_USER_EXTENSIONS( \
568      CONFIGURE_MAXIMUM_USER_EXTENSIONS + CONFIGURE_NEWLIB_EXTENSION + \
569      CONFIGURE_STACK_CHECKER_EXTENSION ) + \
570   CONFIGURE_MEMORY_FOR_DEVICES(CONFIGURE_MAXIMUM_DEVICES) + \
571   CONFIGURE_MEMORY_FOR_MP + \
572   CONFIGURE_MEMORY_FOR_SYSTEM_OVEREHAD + \
573   (((CONFIGURE_MEMORY_OVERHEAD)+1) * 1024) + \
574   (CONFIGURE_EXTRA_TASK_STACKS) + (CONFIGURE_ADA_TASKS_STACK) \
575) & 0xfffffc00)
576#endif
577
578#ifdef CONFIGURE_GNAT_RTEMS
579#define CONFIGURE_GNAT_MUTEXES 10
580#define CONFIGURE_GNAT_KEYS    1
581
582/* 20 are required to run all tests in the ACVC */
583#ifndef CONFIGURE_MAXIMUM_ADA_TASKS
584#define CONFIGURE_MAXIMUM_ADA_TASKS  20
585#endif
586
587/* This is the number of non-Ada tasks which invoked Ada code. */
588#ifndef CONFIGURE_MAXIMUM_FAKE_ADA_TASKS
589#define CONFIGURE_MAXIMUM_FAKE_ADA_TASKS 0
590#endif
591
592/* Ada tasks are allocated twice the minimum stack space */
593#define CONFIGURE_ADA_TASKS_STACK \
594  (CONFIGURE_MAXIMUM_ADA_TASKS * (RTEMS_MINIMUM_STACK_SIZE + (6 * 1024)))
595
596#else
597#define CONFIGURE_GNAT_MUTEXES           0
598#define CONFIGURE_GNAT_KEYS              0
599#define CONFIGURE_MAXIMUM_ADA_TASKS      0
600#define CONFIGURE_MAXIMUM_FAKE_ADA_TASKS 0
601#define CONFIGURE_ADA_TASKS_STACK        0
602#endif
603
604
605#ifdef CONFIGURE_INIT
606
607rtems_api_configuration_table Configuration_RTEMS_API = {
608  CONFIGURE_MAXIMUM_TASKS,
609  CONFIGURE_MAXIMUM_TIMERS,
610  CONFIGURE_MAXIMUM_SEMAPHORES + CONFIGURE_LIBIO_SEMAPHORES,
611  CONFIGURE_MAXIMUM_MESSAGE_QUEUES,
612  CONFIGURE_MAXIMUM_PARTITIONS,
613  CONFIGURE_MAXIMUM_REGIONS + CONFIGURE_MALLOC_REGION,
614  CONFIGURE_MAXIMUM_PORTS,
615  CONFIGURE_MAXIMUM_PERIODS,
616  CONFIGURE_INIT_TASK_TABLE_SIZE,
617  CONFIGURE_INIT_TASK_TABLE
618};
619
620#ifdef RTEMS_POSIX_API
621posix_api_configuration_table Configuration_POSIX_API = {
622  CONFIGURE_MAXIMUM_POSIX_THREADS + CONFIGURE_MAXIMUM_ADA_TASKS,
623  CONFIGURE_MAXIMUM_POSIX_MUTEXES + CONFIGURE_GNAT_MUTEXES +
624    CONFIGURE_MAXIMUM_ADA_TASKS + CONFIGURE_MAXIMUM_FAKE_ADA_TASKS,
625  CONFIGURE_MAXIMUM_POSIX_CONDITION_VARIABLES +
626    CONFIGURE_MAXIMUM_ADA_TASKS + CONFIGURE_MAXIMUM_FAKE_ADA_TASKS,
627  CONFIGURE_MAXIMUM_POSIX_KEYS + CONFIGURE_GNAT_KEYS,
628  CONFIGURE_MAXIMUM_POSIX_TIMERS,
629  CONFIGURE_MAXIMUM_POSIX_QUEUED_SIGNALS,
630  CONFIGURE_POSIX_INIT_THREAD_TABLE_SIZE,
631  CONFIGURE_POSIX_INIT_THREAD_TABLE_NAME
632};
633#endif
634
635rtems_configuration_table Configuration = {
636  CONFIGURE_EXECUTIVE_RAM_WORK_AREA,
637  CONFIGURE_EXECUTIVE_RAM_SIZE,
638  CONFIGURE_MAXIMUM_USER_EXTENSIONS + CONFIGURE_NEWLIB_EXTENSION + 
639      CONFIGURE_STACK_CHECKER_EXTENSION,
640  CONFIGURE_MICROSECONDS_PER_TICK,
641  CONFIGURE_TICKS_PER_TIMESLICE,
642  CONFIGURE_MAXIMUM_DEVICES,
643  sizeof (Device_drivers)/
644    sizeof(rtems_driver_address_table),      /* number of device drivers */
645  Device_drivers,                            /* pointer to driver table */
646  CONFIGURE_NUMBER_OF_INITIAL_EXTENSIONS,    /* number of initial extensions */
647  Configuration_Initial_Extensions,          /* pointer to initial extensions */
648  CONFIGURE_MULTIPROCESSING_TABLE,           /* pointer to MP config table */
649  &Configuration_RTEMS_API,                  /* pointer to RTEMS API config */
650#ifdef RTEMS_POSIX_API
651  &Configuration_POSIX_API                   /* pointer to POSIX API config */
652#else
653  NULL                                       /* pointer to POSIX API config */
654#endif
655};
656#endif
657
658#endif /* CONFIGURE_HAS_OWN_CONFIGURATION_TABLE */
659
660#ifdef __cplusplus
661}
662#endif
663 
664#endif
665/* end of include file */
Note: See TracBrowser for help on using the repository browser.