summaryrefslogtreecommitdiffstats
path: root/c/src/exec/sapi/include/confdefs.h
blob: 6f8670346c8313dfc7fecdff64706ddb30bda6ea (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
/*  confdefs.h
 *
 *  This include file contains the configuration table template that will
 *  be instantiated by an application based on the setting of a number
 *  of macros.  The macros are documented in the Configuring a System
 *  chapter of the Classic API User's Guide
 *
 *  The model is to estimate the memory required for each configured item
 *  and sum those estimates.  The estimate can be too high or too low for
 *  a variety of reasons:
 *
 *  Reasons estimate is too high:
 *    + FP contexts (not all tasks are FP)
 *
 *  Reasons estimate is too low:
 *    + stacks greater than minimum size
 *    + messages
 *    + application must account for device driver resources
 *    + application must account for add-on library resource requirements
 *
 *  NOTE:  Eventually this may be able to take into account some of
 *         the above.  This procedure has evolved from just enough to
 *         support the RTEMS Test Suites into something that can be
 *         used remarkably reliably by most applications.
 *  COPYRIGHT (c) 1989-1999.
 *  On-Line Applications Research Corporation (OAR).
 *
 *  The license and distribution terms for this file may be
 *  found in the file LICENSE in this distribution or at
 *  http://www.OARcorp.com/rtems/license.html.
 *
 *  $Id$
 */

#ifndef __CONFIGURATION_TEMPLATE_h
#define __CONFIGURATION_TEMPLATE_h
 
#ifdef __cplusplus
extern "C" {
#endif
 
extern rtems_initialization_tasks_table Initialization_tasks[];
extern rtems_driver_address_table       Device_drivers[];
extern rtems_configuration_table        Configuration;
extern rtems_multiprocessing_table      Multiprocessing_configuration;
#ifdef RTEMS_POSIX_API
extern posix_api_configuration_table    Configuration_POSIX_API;
#endif
#ifdef RTEMS_ITRON_API
extern itron_api_configuration_table    Configuration_ITRON_API;
#endif

/*
 *  RTEMS C Library and Newlib support
 *
 *  NOTE:  This ends up defining these even when newlib is not used.
 */

#define CONFIGURE_NEWLIB_EXTENSION 1
#define CONFIGURE_MALLOC_REGION 1

/*
 *  File descriptors managed by libio
 */

#ifndef CONFIGURE_LIBIO_MAXIMUM_FILE_DESCRIPTORS
#define CONFIGURE_LIBIO_MAXIMUM_FILE_DESCRIPTORS 3
#endif

#define CONFIGURE_LIBIO_SEMAPHORES \
  (CONFIGURE_LIBIO_MAXIMUM_FILE_DESCRIPTORS + 1)

#ifdef CONFIGURE_INIT
unsigned32 rtems_libio_number_iops = CONFIGURE_LIBIO_MAXIMUM_FILE_DESCRIPTORS;
#endif

/*
 *  Termios resources
 */

#ifdef CONFIGURE_TERMIOS_DISABLED
#define CONFIGURE_TERMIOS_SEMAPHORES 0
#else

#ifndef CONFIGURE_NUMBER_OF_TERMIOS_PORTS
#define CONFIGURE_NUMBER_OF_TERMIOS_PORTS 1
#endif

#define CONFIGURE_TERMIOS_SEMAPHORES \
  ((CONFIGURE_NUMBER_OF_TERMIOS_PORTS * 4) + 1)
#endif

/*
 *  Mount Table Configuration
 */

#include <imfs.h>

#ifdef CONFIGURE_INIT

#ifndef CONFIGURE_HAS_OWN_MOUNT_TABLE
rtems_filesystem_mount_table_t configuration_mount_table = {
#ifdef CONFIGURE_USE_IMFS_AS_BASE_FILESYSTEM
  &IMFS_ops,
#else  /* using miniIMFS as base filesystem */
  &miniIMFS_ops,
#endif
  RTEMS_FILESYSTEM_READ_WRITE,
  NULL,
  NULL
};

rtems_filesystem_mount_table_t 
    *rtems_filesystem_mount_table = &configuration_mount_table;
int rtems_filesystem_mount_table_size = 1;
#endif

#endif


/*
 *  Stack Checker Requirements
 *
 *  NOTE: This does not automatically enable reporting at program exit.
 */

#ifdef STACK_CHECKER_ON
#define CONFIGURE_STACK_CHECKER_EXTENSION 1
#else
#define CONFIGURE_STACK_CHECKER_EXTENSION 0
#endif

/*
 *  Interrupt Stack Space
 *
 *  NOTE: There is currently no way for the application to override
 *        the interrupt stack size set by the BSP.
 */

#if (CPU_ALLOCATE_INTERRUPT_STACK == 0)
#undef CONFIGURE_INTERRUPT_STACK_MEMORY
#define CONFIGURE_INTERRUPT_STACK_MEMORY 0
#else
  #ifndef CONFIGURE_INTERRUPT_STACK_MEMORY
  #define CONFIGURE_INTERRUPT_STACK_MEMORY RTEMS_MINIMUM_STACK_SIZE
  #endif
#endif

/*
 *  Default User Initialization Task Table.  This table guarantees that
 *  one user initialization table is defined.
 */

#ifdef CONFIGURE_RTEMS_INIT_TASKS_TABLE

#ifdef CONFIGURE_HAS_OWN_INIT_TASK_TABLE

/*
 *  The user is defining their own table information and setting the 
 *  appropriate variables.
 */

#else

#ifndef CONFIGURE_INIT_TASK_NAME
#define CONFIGURE_INIT_TASK_NAME          rtems_build_name( 'U', 'I', '1', ' ' )
#endif

#ifndef CONFIGURE_INIT_TASK_STACK_SIZE
#define CONFIGURE_INIT_TASK_STACK_SIZE    RTEMS_MINIMUM_STACK_SIZE 
#endif

#ifndef CONFIGURE_INIT_TASK_PRIORITY
#define CONFIGURE_INIT_TASK_PRIORITY      1
#endif

#ifndef CONFIGURE_INIT_TASK_ATTRIBUTES
#define CONFIGURE_INIT_TASK_ATTRIBUTES    RTEMS_DEFAULT_ATTRIBUTES 
#endif

#ifndef CONFIGURE_INIT_TASK_ENTRY_POINT
#define CONFIGURE_INIT_TASK_ENTRY_POINT   Init 
#endif

#ifndef CONFIGURE_INIT_TASK_INITIAL_MODES
#define CONFIGURE_INIT_TASK_INITIAL_MODES RTEMS_NO_PREEMPT 
#endif

#ifndef CONFIGURE_INIT_TASK_ARGUMENTS
#define CONFIGURE_INIT_TASK_ARGUMENTS     0 
#endif

#ifdef CONFIGURE_INIT
rtems_initialization_tasks_table Initialization_tasks[] = {
  { CONFIGURE_INIT_TASK_NAME,
    CONFIGURE_INIT_TASK_STACK_SIZE,
    CONFIGURE_INIT_TASK_PRIORITY,
    CONFIGURE_INIT_TASK_ATTRIBUTES,
    CONFIGURE_INIT_TASK_ENTRY_POINT,
    CONFIGURE_INIT_TASK_INITIAL_MODES,
    CONFIGURE_INIT_TASK_ARGUMENTS
  }
};
#endif

#define CONFIGURE_INIT_TASK_TABLE Initialization_tasks

#define CONFIGURE_INIT_TASK_TABLE_SIZE \
  sizeof(CONFIGURE_INIT_TASK_TABLE) / sizeof(rtems_initialization_tasks_table)

#endif    /* CONFIGURE_HAS_OWN_INIT_TASK_TABLE */

#else     /* CONFIGURE_RTEMS_INIT_TASKS_TABLE */

#define CONFIGURE_INIT_TASK_TABLE      NULL
#define CONFIGURE_INIT_TASK_TABLE_SIZE 0
#define CONFIGURE_INIT_TASK_STACK_SIZE 0

#endif

/*
 *  Map obsolete names to current ones
 *
 *  NOTE: These should be obsoleted in a future release.
 */

#ifdef CONFIGURE_TEST_NEEDS_TIMER_DRIVER
#define CONFIGURE_APPLICATION_NEEDS_TIMER_DRIVER
#endif
#ifdef CONFIGURE_TEST_NEEDS_CONSOLE_DRIVER
#define CONFIGURE_APPLICATION_NEEDS_CONSOLE_DRIVER
#endif 
#ifdef CONFIGURE_TEST_NEEDS_CLOCK_DRIVER
#define CONFIGURE_APPLICATION_NEEDS_CLOCK_DRIVER
#endif 
#ifdef CONFIGURE_TEST_NEEDS_RTC_DRIVER
#define CONFIGURE_APPLICATION_NEEDS_RTC_DRIVER
#endif 
#ifdef CONFIGURE_TEST_NEEDS_STUB_DRIVER
#define CONFIGURE_APPLICATION_NEEDS_STUB_DRIVER
#endif


/*
 *  Default Device Driver Table.  Each driver needed by the test is explicitly
 *  choosen by that test.  There is always a null driver entry.
 */

#define NULL_DRIVER_TABLE_ENTRY \
 { NULL, NULL, NULL, NULL, NULL, NULL }

#ifdef CONFIGURE_APPLICATION_NEEDS_CONSOLE_DRIVER
#include <console.h>
#endif

#ifdef CONFIGURE_APPLICATION_NEEDS_CLOCK_DRIVER
#include <clockdrv.h>
#endif

#ifdef CONFIGURE_APPLICATION_NEEDS_TIMER_DRIVER
#include <timerdrv.h>
#endif

#ifdef CONFIGURE_APPLICATION_NEEDS_STUB_DRIVER
#include <stubdrv.h>
#endif

#ifndef CONFIGURE_HAS_OWN_DEVICE_DRIVER_TABLE

#ifdef CONFIGURE_INIT
rtems_driver_address_table Device_drivers[] = {
#ifdef CONFIGURE_APPLICATION_NEEDS_CONSOLE_DRIVER
  CONSOLE_DRIVER_TABLE_ENTRY,
#endif
#ifdef CONFIGURE_APPLICATION_NEEDS_CLOCK_DRIVER
  CLOCK_DRIVER_TABLE_ENTRY,
#endif
#ifdef CONFIGURE_APPLICATION_NEEDS_STUB_DRIVER
  STUB_DRIVER_TABLE_ENTRY,
#endif
  NULL_DRIVER_TABLE_ENTRY
};
#endif

#endif  /* CONFIGURE_HAS_OWN_DEVICE_DRIVER_TABLE */

/*
 *  Default the number of devices per device driver.  This value may be
 *  overridden by the user.
 */

#ifndef CONFIGURE_MAXIMUM_DEVICES
#define CONFIGURE_MAXIMUM_DEVICES   20
#endif

/*
 *  Default Multiprocessing Configuration Table.  The defaults are
 *  appropriate for most of the RTEMS Multiprocessor Test Suite.  Each
 *  value may be overridden within each test to customize the environment. 
 */

#ifdef CONFIGURE_MP_APPLICATION
#ifndef CONFIGURE_HAS_OWN_MULTIPROCESING_TABLE

#ifndef CONFIGURE_MP_NODE_NUMBER
#define CONFIGURE_MP_NODE_NUMBER                NODE_NUMBER
#endif

#ifndef CONFIGURE_MP_MAXIMUM_NODES
#define CONFIGURE_MP_MAXIMUM_NODES              2
#endif

#ifndef CONFIGURE_MP_MAXIMUM_GLOBAL_OBJECTS
#define CONFIGURE_MP_MAXIMUM_GLOBAL_OBJECTS     32
#endif

#ifndef CONFIGURE_MP_MAXIMUM_PROXIES
#define CONFIGURE_MP_MAXIMUM_PROXIES            32
#endif

#ifndef CONFIGURE_MP_MPCI_TABLE_POINTER
#include <mpci.h>
#define CONFIGURE_MP_MPCI_TABLE_POINTER         &MPCI_table
#endif

#ifdef CONFIGURE_INIT
rtems_multiprocessing_table Multiprocessing_configuration = {
  CONFIGURE_MP_NODE_NUMBER,              /* local node number */
  CONFIGURE_MP_MAXIMUM_NODES,            /* maximum # nodes in system */
  CONFIGURE_MP_MAXIMUM_GLOBAL_OBJECTS,   /* maximum # global objects */
  CONFIGURE_MP_MAXIMUM_PROXIES,          /* maximum # proxies */
  CONFIGURE_MP_MPCI_TABLE_POINTER        /* pointer to MPCI config table */
};
#endif

#define CONFIGURE_MULTIPROCESSING_TABLE    &Multiprocessing_configuration

#endif /* CONFIGURE_HAS_OWN_MULTIPROCESING_TABLE */

#else

#define CONFIGURE_MULTIPROCESSING_TABLE    NULL

#endif /* CONFIGURE_MP_APPLICATION */
 
/*
 *  Default Configuration Table.  
 */

#ifndef CONFIGURE_HAS_OWN_CONFIGURATION_TABLE
 
#ifndef CONFIGURE_EXECUTIVE_RAM_WORK_AREA
#define CONFIGURE_EXECUTIVE_RAM_WORK_AREA     NULL
#endif

#ifndef CONFIGURE_MAXIMUM_TASKS
#define CONFIGURE_MAXIMUM_TASKS               0
#endif

#ifndef CONFIGURE_MAXIMUM_TIMERS
#define CONFIGURE_MAXIMUM_TIMERS              0
#endif

#ifndef CONFIGURE_MAXIMUM_SEMAPHORES
#define CONFIGURE_MAXIMUM_SEMAPHORES          0
#endif

#ifndef CONFIGURE_MAXIMUM_MESSAGE_QUEUES
#define CONFIGURE_MAXIMUM_MESSAGE_QUEUES      0
#endif

#ifndef CONFIGURE_MAXIMUM_PARTITIONS
#define CONFIGURE_MAXIMUM_PARTITIONS          0
#endif

#ifndef CONFIGURE_MAXIMUM_REGIONS
#define CONFIGURE_MAXIMUM_REGIONS             0
#endif

#ifndef CONFIGURE_MAXIMUM_PORTS
#define CONFIGURE_MAXIMUM_PORTS               0
#endif

#ifndef CONFIGURE_MAXIMUM_PERIODS
#define CONFIGURE_MAXIMUM_PERIODS             0
#endif

#ifndef CONFIGURE_MAXIMUM_USER_EXTENSIONS
#define CONFIGURE_MAXIMUM_USER_EXTENSIONS     0
#endif

#ifndef CONFIGURE_MICROSECONDS_PER_TICK 
#define CONFIGURE_MICROSECONDS_PER_TICK RTEMS_MILLISECONDS_TO_MICROSECONDS(10)
#endif

#ifndef CONFIGURE_TICKS_PER_TIMESLICE
#define CONFIGURE_TICKS_PER_TIMESLICE        50
#endif

/*
 *  Initial Extension Set
 */

#ifdef CONFIGURE_INIT
#ifdef STACK_CHECKER_ON
#include <rtems/stackchk.h>
#endif

rtems_extensions_table Configuration_Initial_Extensions[] = {
#ifdef CONFIGURE_INITIAL_EXTENSIONS
    CONFIGURE_INITIAL_EXTENSIONS,
#endif
#ifdef STACK_CHECKER_ON
    STACK_CHECKER_EXTENSION,
#endif
    { NULL, NULL, NULL, NULL, NULL, NULL, NULL }
};

#define CONFIGURE_NUMBER_OF_INITIAL_EXTENSIONS \
  ((sizeof(Configuration_Initial_Extensions) / \
    sizeof(rtems_extensions_table)) - 1)

#endif

/*
 *  POSIX API Configuration Parameters
 */

#ifdef RTEMS_POSIX_API

#include <sys/types.h>
#include <sys/siginfo.h>
#include <mqueue.h>
#include <rtems/posix/cond.h>
#include <rtems/posix/mqueue.h>
#include <rtems/posix/mutex.h>
#include <rtems/posix/key.h>
#include <rtems/posix/psignal.h>
#include <rtems/posix/semaphore.h>
#include <rtems/posix/threadsup.h>

#ifndef CONFIGURE_MAXIMUM_POSIX_THREADS
#define CONFIGURE_MAXIMUM_POSIX_THREADS      0
#endif

#ifndef CONFIGURE_MAXIMUM_POSIX_MUTEXES
#define CONFIGURE_MAXIMUM_POSIX_MUTEXES      0
#endif

#ifndef CONFIGURE_MAXIMUM_POSIX_CONDITION_VARIABLES
#define CONFIGURE_MAXIMUM_POSIX_CONDITION_VARIABLES  0
#endif

#ifndef CONFIGURE_MAXIMUM_POSIX_KEYS
#define CONFIGURE_MAXIMUM_POSIX_KEYS         0
#endif

#ifndef CONFIGURE_MAXIMUM_POSIX_TIMERS
#define CONFIGURE_MAXIMUM_POSIX_TIMERS 0
#endif

#ifndef CONFIGURE_MAXIMUM_POSIX_QUEUED_SIGNALS
#define CONFIGURE_MAXIMUM_POSIX_QUEUED_SIGNALS 0
#endif

#ifndef CONFIGURE_MAXIMUM_POSIX_MESSAGE_QUEUES
#define CONFIGURE_MAXIMUM_POSIX_MESSAGE_QUEUES 0
#endif

#ifndef CONFIGURE_MAXIMUM_POSIX_SEMAPHORES
#define CONFIGURE_MAXIMUM_POSIX_SEMAPHORES 0
#endif

#ifdef CONFIGURE_POSIX_INIT_THREAD_TABLE

#ifdef CONFIGURE_POSIX_HAS_OWN_INIT_THREAD_TABLE

/*
 *  The user is defining their own table information and setting the
 *  appropriate variables for the POSIX Initialization Thread Table.
 */
 
#else

#ifndef CONFIGURE_POSIX_INIT_THREAD_ENTRY_POINT
#define CONFIGURE_POSIX_INIT_THREAD_ENTRY_POINT   POSIX_Init 
#endif

#ifndef CONFIGURE_POSIX_INIT_THREAD_STACK_SIZE
#define CONFIGURE_POSIX_INIT_THREAD_STACK_SIZE    (RTEMS_MINIMUM_STACK_SIZE * 2)
#endif

#ifdef CONFIGURE_INIT
posix_initialization_threads_table POSIX_Initialization_threads[] = {
  { CONFIGURE_POSIX_INIT_THREAD_ENTRY_POINT, \
      CONFIGURE_POSIX_INIT_THREAD_STACK_SIZE }
};
#endif

#define CONFIGURE_POSIX_INIT_THREAD_TABLE_NAME POSIX_Initialization_threads
 
#define CONFIGURE_POSIX_INIT_THREAD_TABLE_SIZE \
  sizeof(CONFIGURE_POSIX_INIT_THREAD_TABLE_NAME) / \
      sizeof(posix_initialization_threads_table)

#endif    /* CONFIGURE_POSIX_HAS_OWN_INIT_TASK_TABLE */

#else     /* CONFIGURE_POSIX_INIT_THREAD_TABLE */

#define CONFIGURE_POSIX_INIT_THREAD_TABLE_NAME NULL
#define CONFIGURE_POSIX_INIT_THREAD_TABLE_SIZE 0

#endif

#define CONFIGURE_MEMORY_PER_TASK_FOR_POSIX_API \
  ( \
    sizeof (POSIX_API_Control) + \
   (sizeof (void *) * (CONFIGURE_GNAT_KEYS + CONFIGURE_MAXIMUM_POSIX_KEYS)) \
  )

#define CONFIGURE_MEMORY_FOR_POSIX_MUTEXES(_mutexes) \
  ((_mutexes) * \
   ( sizeof(POSIX_Mutex_Control) + CONFIGURE_OBJECT_TABLE_STUFF ) )

#define CONFIGURE_MEMORY_FOR_POSIX_CONDITION_VARIABLES(_condition_variables) \
  ((_condition_variables) * \
   ( sizeof(POSIX_Condition_variables_Control) + \
        CONFIGURE_OBJECT_TABLE_STUFF ) )

#define CONFIGURE_MEMORY_FOR_POSIX_KEYS(_keys) \
  ((_keys) * \
   ( sizeof(POSIX_Keys_Control) + CONFIGURE_OBJECT_TABLE_STUFF ) )

#define CONFIGURE_MEMORY_FOR_POSIX_TIMERS(_timers) \
  ((_timers) * \
   ( 0 ) )

#define CONFIGURE_MEMORY_FOR_POSIX_QUEUED_SIGNALS(_queued_signals) \
  ((_queued_signals) * \
   ( sizeof(POSIX_signals_Siginfo_node) + CONFIGURE_OBJECT_TABLE_STUFF ) )

#define CONFIGURE_MEMORY_FOR_POSIX_MESSAGE_QUEUES(_message_queues) \
  ((_message_queues) * \
   ( sizeof( POSIX_Message_queue_Control) + CONFIGURE_OBJECT_TABLE_STUFF ) )
#define CONFIGURE_MEMORY_FOR_POSIX_SEMAPHORES(_semaphores) \
  ((_semaphores) * \
   ( sizeof( POSIX_Semaphore_Control) + CONFIGURE_OBJECT_TABLE_STUFF ) )
  

#define CONFIGURE_MEMORY_FOR_POSIX \
  ( \
    CONFIGURE_MEMORY_FOR_POSIX_MUTEXES( CONFIGURE_MAXIMUM_POSIX_MUTEXES ) + \
    CONFIGURE_MEMORY_FOR_POSIX_CONDITION_VARIABLES( \
        CONFIGURE_MAXIMUM_POSIX_CONDITION_VARIABLES ) + \
    CONFIGURE_MEMORY_FOR_POSIX_KEYS( CONFIGURE_MAXIMUM_POSIX_KEYS ) + \
    CONFIGURE_MEMORY_FOR_POSIX_QUEUED_SIGNALS( \
        CONFIGURE_MAXIMUM_POSIX_QUEUED_SIGNALS ) + \
    CONFIGURE_MEMORY_FOR_POSIX_MESSAGE_QUEUES( \
        CONFIGURE_MAXIMUM_POSIX_MESSAGE_QUEUES ) + \
    CONFIGURE_MEMORY_FOR_POSIX_SEMAPHORES( \
        CONFIGURE_MAXIMUM_POSIX_SEMAPHORES ) + \
    (CONFIGURE_POSIX_INIT_THREAD_STACK_SIZE) \
   )


#else

#define CONFIGURE_MAXIMUM_POSIX_THREADS         0
#define CONFIGURE_MEMORY_PER_TASK_FOR_POSIX_API 0
#define CONFIGURE_MEMORY_FOR_POSIX              0


#endif    /* RTEMS_POSIX_API */

#ifndef CONFIGURE_POSIX_INIT_THREAD_STACK_SIZE
#define CONFIGURE_POSIX_INIT_THREAD_STACK_SIZE    0
#endif

/*
 *  ITRON API Configuration Parameters
 */

#ifdef RTEMS_ITRON_API

#include <itron.h>
#include <rtems/itron/config.h>
#include <rtems/itron/eventflags.h>
#include <rtems/itron/fmempool.h>
#include <rtems/itron/mbox.h>
#include <rtems/itron/msgbuffer.h>
#include <rtems/itron/port.h>
#include <rtems/itron/semaphore.h>
#include <rtems/itron/task.h>
#include <rtems/itron/vmempool.h>

#ifndef CONFIGURE_MAXIMUM_ITRON_TASKS
#define CONFIGURE_MAXIMUM_ITRON_TASKS      0
#endif

#ifndef CONFIGURE_MAXIMUM_ITRON_SEMAPHORES
#define CONFIGURE_MAXIMUM_ITRON_SEMAPHORES   0
#endif

#ifndef CONFIGURE_MAXIMUM_ITRON_EVENTFLAGS
#define CONFIGURE_MAXIMUM_ITRON_EVENTFLAGS   0
#endif

#ifndef CONFIGURE_MAXIMUM_ITRON_MAILBOXES
#define CONFIGURE_MAXIMUM_ITRON_MAILBOXES   0
#endif

#ifndef CONFIGURE_MAXIMUM_ITRON_MESSAGE_BUFFERS
#define CONFIGURE_MAXIMUM_ITRON_MESSAGE_BUFFERS   0
#endif

#ifndef CONFIGURE_MAXIMUM_ITRON_PORTS
#define CONFIGURE_MAXIMUM_ITRON_PORTS   0
#endif

#ifndef CONFIGURE_MAXIMUM_ITRON_MEMORY_POOLS
#define CONFIGURE_MAXIMUM_ITRON_MEMORY_POOLS   0
#endif

#ifndef CONFIGURE_MAXIMUM_ITRON_FIXED_MEMORY_POOLS
#define CONFIGURE_MAXIMUM_ITRON_FIXED_MEMORY_POOLS   0
#endif

#ifdef CONFIGURE_ITRON_INIT_TASK_TABLE

#ifdef CONFIGURE_ITRON_HAS_OWN_INIT_TASK_TABLE

/*
 *  The user is defining their own table information and setting the
 *  appropriate variables for the ITRON Initialization Task Table.
 */

#else

#ifndef CONFIGURE_ITRON_INIT_TASK_ENTRY_POINT
#define CONFIGURE_ITRON_INIT_TASK_ENTRY_POINT   ITRON_Init
#endif

#ifndef CONFIGURE_ITRON_INIT_TASK_ATTRIBUTES
#define CONFIGURE_ITRON_INIT_TASK_ATTRIBUTES    TA_HLNG
#endif

#ifndef CONFIGURE_ITRON_INIT_TASK_PRIORITY
#define CONFIGURE_ITRON_INIT_TASK_PRIORITY      1
#endif

#ifndef CONFIGURE_ITRON_INIT_TASK_STACK_SIZE
#define CONFIGURE_ITRON_INIT_TASK_STACK_SIZE    RTEMS_MINIMUM_STACK_SIZE
#endif

#ifdef CONFIGURE_INIT
itron_initialization_tasks_table ITRON_Initialization_tasks[] = {
  { 1,                                    /* ID */
    { (VP) 0,                                /* exinfo */
      CONFIGURE_ITRON_INIT_TASK_ATTRIBUTES,  /* task attributes */
      CONFIGURE_ITRON_INIT_TASK_ENTRY_POINT, /* task start address */
      CONFIGURE_ITRON_INIT_TASK_PRIORITY,    /* initial task priority */
      CONFIGURE_ITRON_INIT_TASK_STACK_SIZE   /* stack size */
    }
  }
};
#endif

#define CONFIGURE_ITRON_INIT_TASK_TABLE_NAME ITRON_Initialization_tasks

#define CONFIGURE_ITRON_INIT_TASK_TABLE_SIZE \
  sizeof(CONFIGURE_ITRON_INIT_TASK_TABLE_NAME) / \
      sizeof(itron_initialization_tasks_table)

#endif    /* CONFIGURE_ITRON_HAS_OWN_INIT_TASK_TABLE */

#else     /* CONFIGURE_ITRON_INIT_TASK_TABLE */

#define CONFIGURE_ITRON_INIT_TASK_TABLE_NAME NULL
#define CONFIGURE_ITRON_INIT_TASK_TABLE_SIZE 0

#endif

#define CONFIGURE_MEMORY_PER_TASK_FOR_ITRON_API \
  ( \
    sizeof (ITRON_API_Control) \
  )

#define CONFIGURE_MEMORY_FOR_ITRON_SEMAPHORES(_semaphores) \
  ((_semaphores) * \
   ( sizeof(ITRON_Semaphore_Control) + CONFIGURE_OBJECT_TABLE_STUFF ) )

#define CONFIGURE_MEMORY_FOR_ITRON_EVENTFLAGS(_eventflags) \
  ((_eventflags) * \
   ( sizeof(ITRON_Eventflags_Control) + CONFIGURE_OBJECT_TABLE_STUFF ) )

#define CONFIGURE_MEMORY_FOR_ITRON_MAILBOXES(_mailboxes) \
  ((_mailboxes) * \
   ( sizeof(ITRON_Mailbox_Control) + CONFIGURE_OBJECT_TABLE_STUFF ) )

#define CONFIGURE_MEMORY_FOR_ITRON_MESSAGE_BUFFERS(_message_buffers) \
  ((_message_buffers) * \
   ( sizeof(ITRON_Message_buffer_Control) + CONFIGURE_OBJECT_TABLE_STUFF ) )

#define CONFIGURE_MEMORY_FOR_ITRON_PORTS(_ports) \
  ((_ports) * \
   ( sizeof(ITRON_Port_Control) + CONFIGURE_OBJECT_TABLE_STUFF ) )

#define CONFIGURE_MEMORY_FOR_ITRON_MEMORY_POOLS(_memory_pools) \
  ((_memory_pools) * \
   (sizeof(ITRON_Variable_memory_pool_Control) + CONFIGURE_OBJECT_TABLE_STUFF))

#define CONFIGURE_MEMORY_FOR_ITRON_FIXED_MEMORY_POOLS(_fixed_memory_pools) \
  ((_fixed_memory_pools) * \
   ( sizeof(ITRON_Fixed_memory_pool_Control) + CONFIGURE_OBJECT_TABLE_STUFF ) )

#ifndef CONFIGURE_ITRON_INIT_TASK_STACK_SIZE
#define CONFIGURE_ITRON_INIT_TASK_STACK_SIZE (RTEMS_MINIMUM_STACK_SIZE * 2)
#endif


#define CONFIGURE_MEMORY_FOR_ITRON \
  ( \
    CONFIGURE_MEMORY_FOR_ITRON_SEMAPHORES( \
        CONFIGURE_MAXIMUM_ITRON_SEMAPHORES ) + \
    CONFIGURE_MEMORY_FOR_ITRON_EVENTFLAGS( \
        CONFIGURE_MAXIMUM_ITRON_EVENTFLAGS ) + \
    CONFIGURE_MEMORY_FOR_ITRON_MAILBOXES( \
        CONFIGURE_MAXIMUM_ITRON_MAILBOXES ) + \
    CONFIGURE_MEMORY_FOR_ITRON_MESSAGE_BUFFERS( \
        CONFIGURE_MAXIMUM_ITRON_MESSAGE_BUFFERS ) + \
    CONFIGURE_MEMORY_FOR_ITRON_PORTS( \
        CONFIGURE_MAXIMUM_ITRON_PORTS ) + \
    CONFIGURE_MEMORY_FOR_ITRON_MEMORY_POOLS( \
        CONFIGURE_MAXIMUM_ITRON_MEMORY_POOLS ) + \
    CONFIGURE_MEMORY_FOR_ITRON_FIXED_MEMORY_POOLS( \
        CONFIGURE_MAXIMUM_ITRON_FIXED_MEMORY_POOLS ) + \
    CONFIGURE_ITRON_INIT_TASK_STACK_SIZE \
   )


#else

#define CONFIGURE_MAXIMUM_ITRON_TASKS               0
#define CONFIGURE_MAXIMUM_ITRON_SEMAPHORES          0
#define CONFIGURE_MAXIMUM_ITRON_EVENTFLAGS          0
#define CONFIGURE_MAXIMUM_ITRON_MAILBOXES           0
#define CONFIGURE_MAXIMUM_ITRON_MESSAGE_BUFFERS     0
#define CONFIGURE_MAXIMUM_ITRON_PORTS               0
#define CONFIGURE_MAXIMUM_ITRON_MEMORY_POOLS        0
#define CONFIGURE_MAXIMUM_ITRON_FIXED_MEMORY_POOLS  0
#define CONFIGURE_MEMORY_PER_TASK_FOR_ITRON_API     0
#define CONFIGURE_MEMORY_FOR_ITRON                  0

#endif    /* RTEMS_ITRON_API */


/* 
 *  Calculate the RAM size based on the maximum number of objects configured.
 */

#ifndef CONFIGURE_EXECUTIVE_RAM_SIZE

#define CONFIGURE_OBJECT_TABLE_STUFF \
  ( sizeof(Objects_Control *) + sizeof(rtems_name *) + sizeof(rtems_name) )

#define CONFIGURE_MEMORY_FOR_TASKS(_tasks) \
  (((_tasks) + 1 ) * \
   ((sizeof(Thread_Control) + CONTEXT_FP_SIZE + \
      STACK_MINIMUM_SIZE + sizeof( RTEMS_API_Control ) + \
      CONFIGURE_MEMORY_PER_TASK_FOR_POSIX_API + \
      CONFIGURE_MEMORY_PER_TASK_FOR_ITRON_API + \
      CONFIGURE_OBJECT_TABLE_STUFF)) \
  )

#define CONFIGURE_MEMORY_FOR_TIMERS(_timers) \
  ((_timers) * ( sizeof(Timer_Control) + CONFIGURE_OBJECT_TABLE_STUFF ) )

#define CONFIGURE_MEMORY_FOR_SEMAPHORES(_semaphores) \
  ((_semaphores) * \
   ( sizeof(Semaphore_Control) + CONFIGURE_OBJECT_TABLE_STUFF ) )

#define CONFIGURE_MEMORY_FOR_MESSAGE_QUEUES(_queues) \
  ( (_queues) * \
    ( sizeof(Message_queue_Control) + CONFIGURE_OBJECT_TABLE_STUFF ) )

#define CONFIGURE_MEMORY_FOR_PARTITIONS(_partitions) \
  ( (_partitions) * \
    ( sizeof(Partition_Control) + CONFIGURE_OBJECT_TABLE_STUFF ) )

#define CONFIGURE_MEMORY_FOR_REGIONS(_regions) \
  ( (_regions) * \
    ( sizeof(Region_Control) + CONFIGURE_OBJECT_TABLE_STUFF ) )

#define CONFIGURE_MEMORY_FOR_PORTS(_ports) \
  ( (_ports) * \
    ( sizeof(Dual_ported_memory_Control) + CONFIGURE_OBJECT_TABLE_STUFF ) )

#define CONFIGURE_MEMORY_FOR_PERIODS(_periods) \
  ( (_periods) * \
    ( sizeof(Rate_monotonic_Control) + CONFIGURE_OBJECT_TABLE_STUFF ) )

#define CONFIGURE_MEMORY_FOR_USER_EXTENSIONS(_extensions) \
  ( (_extensions) * \
    ( sizeof(Extension_Control) + CONFIGURE_OBJECT_TABLE_STUFF ) )

#define CONFIGURE_MEMORY_FOR_DEVICES(_devices) \
  (((_devices) + 1) * ( sizeof(rtems_driver_name_t) ) )

#ifdef CONFIGURE_MP_APPLICATION

#ifndef CONFIGURE_HAS_OWN_MULTIPROCESING_TABLE

#define CONFIGURE_MEMORY_FOR_PROXIES(_proxies) \
  ( ((_proxies) + 1) * ( sizeof(Thread_Proxy_control) )  )

#define CONFIGURE_MEMORY_FOR_GLOBAL_OBJECTS(_global_objects) \
  ((_global_objects)  * ( sizeof(Objects_MP_Control) )  )

#define CONFIGURE_MEMORY_FOR_MP \
  ( CONFIGURE_MEMORY_FOR_PROXIES(CONFIGURE_MP_MAXIMUM_PROXIES) + \
    CONFIGURE_MEMORY_FOR_GLOBAL_OBJECTS(CONFIGURE_MP_MAXIMUM_GLOBAL_OBJECTS) + \
    CONFIGURE_MEMORY_FOR_TASKS(1) \
  )

#endif  /* CONFIGURE_HAS_OWN_MULTIPROCESING_TABLE */

#else

#define CONFIGURE_MEMORY_FOR_MP  0

#endif

#ifndef CONFIGURE_MEMORY_OVERHEAD
#define CONFIGURE_MEMORY_OVERHEAD 0
#endif

#ifndef CONFIGURE_EXTRA_TASK_STACKS
#define CONFIGURE_EXTRA_TASK_STACKS 0
#endif

#define CONFIGURE_MEMORY_FOR_SYSTEM_OVERHEAD \
  ( CONFIGURE_MEMORY_FOR_TASKS(1) +    /* IDLE */ \
    (256 * 12) +                       /* Ready chains */ \
    256        +                       /* name/ptr table overhead */ \
    CONFIGURE_INTERRUPT_STACK_MEMORY   /* interrupt stack */ \
  )

/*
 *  Now account for any extra memory that initialization tasks or threads
 *  may have requested.
 */

#ifdef RTEMS_POSIX_API
#define CONFIGURE_INITIALIZATION_THREADS_STACKS_POSIX_PART \
    (CONFIGURE_POSIX_INIT_THREAD_STACK_SIZE - RTEMS_MINIMUM_STACK_SIZE)
#else
#define CONFIGURE_INITIALIZATION_THREADS_STACKS_POSIX_PART 0
#endif
#ifdef RTEMS_ITRON_API
#define CONFIGURE_INITIALIZATION_THREADS_STACKS_ITRON_PART \
    (CONFIGURE_ITRON_INIT_TASK_STACK_SIZE - RTEMS_MINIMUM_STACK_SIZE)
#else
#define CONFIGURE_INITIALIZATION_THREADS_STACKS_ITRON_PART 0
#endif

#define CONFIGURE_INITIALIZATION_THREADS_STACKS \
   ((CONFIGURE_INIT_TASK_STACK_SIZE - RTEMS_MINIMUM_STACK_SIZE) + \
    CONFIGURE_INITIALIZATION_THREADS_STACKS_POSIX_PART + \
    CONFIGURE_INITIALIZATION_THREADS_STACKS_ITRON_PART)

#define CONFIGURE_EXECUTIVE_RAM_SIZE \
(( CONFIGURE_MEMORY_FOR_POSIX + \
   CONFIGURE_MEMORY_FOR_ITRON + \
   CONFIGURE_MEMORY_FOR_TASKS(CONFIGURE_MAXIMUM_TASKS + \
      CONFIGURE_MAXIMUM_POSIX_THREADS + CONFIGURE_MAXIMUM_ADA_TASKS + \
      CONFIGURE_MAXIMUM_ITRON_TASKS ) + \
   CONFIGURE_INITIALIZATION_THREADS_STACKS + \
   CONFIGURE_MEMORY_FOR_TIMERS(CONFIGURE_MAXIMUM_TIMERS) + \
   CONFIGURE_MEMORY_FOR_SEMAPHORES(CONFIGURE_MAXIMUM_SEMAPHORES + \
     CONFIGURE_LIBIO_SEMAPHORES + CONFIGURE_TERMIOS_SEMAPHORES) + \
   CONFIGURE_MEMORY_FOR_MESSAGE_QUEUES(CONFIGURE_MAXIMUM_MESSAGE_QUEUES) + \
   CONFIGURE_MEMORY_FOR_PARTITIONS(CONFIGURE_MAXIMUM_PARTITIONS) + \
   CONFIGURE_MEMORY_FOR_REGIONS( \
      CONFIGURE_MAXIMUM_REGIONS + CONFIGURE_MALLOC_REGION ) + \
   CONFIGURE_MEMORY_FOR_PORTS(CONFIGURE_MAXIMUM_PORTS) + \
   CONFIGURE_MEMORY_FOR_PERIODS(CONFIGURE_MAXIMUM_PERIODS) + \
   CONFIGURE_MEMORY_FOR_USER_EXTENSIONS( \
      CONFIGURE_MAXIMUM_USER_EXTENSIONS + CONFIGURE_NEWLIB_EXTENSION + \
      CONFIGURE_STACK_CHECKER_EXTENSION ) + \
   CONFIGURE_MEMORY_FOR_DEVICES(CONFIGURE_MAXIMUM_DEVICES) + \
   CONFIGURE_MEMORY_FOR_MP + \
   CONFIGURE_MEMORY_FOR_SYSTEM_OVERHEAD + \
   (((CONFIGURE_MEMORY_OVERHEAD)+1) * 1024) + \
   (CONFIGURE_EXTRA_TASK_STACKS) + (CONFIGURE_ADA_TASKS_STACK) \
) & 0xfffffc00)
#endif

#ifdef CONFIGURE_GNAT_RTEMS
#define CONFIGURE_GNAT_MUTEXES 10
#define CONFIGURE_GNAT_KEYS    1

/* 20 are required to run all tests in the ACVC */
#ifndef CONFIGURE_MAXIMUM_ADA_TASKS
#define CONFIGURE_MAXIMUM_ADA_TASKS  20
#endif

/* This is the number of non-Ada tasks which invoked Ada code. */
#ifndef CONFIGURE_MAXIMUM_FAKE_ADA_TASKS
#define CONFIGURE_MAXIMUM_FAKE_ADA_TASKS 0
#endif

/* Ada tasks are allocated twice the minimum stack space */
#define CONFIGURE_ADA_TASKS_STACK \
  (CONFIGURE_MAXIMUM_ADA_TASKS * (RTEMS_MINIMUM_STACK_SIZE + (6 * 1024)))

#else
#define CONFIGURE_GNAT_MUTEXES           0
#define CONFIGURE_GNAT_KEYS              0
#define CONFIGURE_MAXIMUM_ADA_TASKS      0
#define CONFIGURE_MAXIMUM_FAKE_ADA_TASKS 0
#define CONFIGURE_ADA_TASKS_STACK        0
#endif


#ifdef CONFIGURE_INIT

rtems_api_configuration_table Configuration_RTEMS_API = {
  CONFIGURE_MAXIMUM_TASKS,
  CONFIGURE_MAXIMUM_TIMERS,
  CONFIGURE_MAXIMUM_SEMAPHORES + CONFIGURE_LIBIO_SEMAPHORES +
    CONFIGURE_TERMIOS_SEMAPHORES,
  CONFIGURE_MAXIMUM_MESSAGE_QUEUES,
  CONFIGURE_MAXIMUM_PARTITIONS,
  CONFIGURE_MAXIMUM_REGIONS + CONFIGURE_MALLOC_REGION,
  CONFIGURE_MAXIMUM_PORTS,
  CONFIGURE_MAXIMUM_PERIODS,
  CONFIGURE_INIT_TASK_TABLE_SIZE,
  CONFIGURE_INIT_TASK_TABLE
};

#ifdef RTEMS_POSIX_API
posix_api_configuration_table Configuration_POSIX_API = {
  CONFIGURE_MAXIMUM_POSIX_THREADS + CONFIGURE_MAXIMUM_ADA_TASKS,
  CONFIGURE_MAXIMUM_POSIX_MUTEXES + CONFIGURE_GNAT_MUTEXES +
    CONFIGURE_MAXIMUM_ADA_TASKS + CONFIGURE_MAXIMUM_FAKE_ADA_TASKS,
  CONFIGURE_MAXIMUM_POSIX_CONDITION_VARIABLES +
    CONFIGURE_MAXIMUM_ADA_TASKS + CONFIGURE_MAXIMUM_FAKE_ADA_TASKS,
  CONFIGURE_MAXIMUM_POSIX_KEYS + CONFIGURE_GNAT_KEYS,
  CONFIGURE_MAXIMUM_POSIX_TIMERS,
  CONFIGURE_MAXIMUM_POSIX_QUEUED_SIGNALS,
  CONFIGURE_MAXIMUM_POSIX_MESSAGE_QUEUES,
  CONFIGURE_MAXIMUM_POSIX_SEMAPHORES,
  CONFIGURE_POSIX_INIT_THREAD_TABLE_SIZE,
  CONFIGURE_POSIX_INIT_THREAD_TABLE_NAME
};
#endif

#ifdef RTEMS_ITRON_API
itron_api_configuration_table Configuration_ITRON_API = {
  CONFIGURE_MAXIMUM_ITRON_TASKS,
  CONFIGURE_MAXIMUM_ITRON_SEMAPHORES,
  CONFIGURE_MAXIMUM_ITRON_EVENTFLAGS,
  CONFIGURE_MAXIMUM_ITRON_MAILBOXES,
  CONFIGURE_MAXIMUM_ITRON_MESSAGE_BUFFERS,
  CONFIGURE_MAXIMUM_ITRON_PORTS,
  CONFIGURE_MAXIMUM_ITRON_MEMORY_POOLS,
  CONFIGURE_MAXIMUM_ITRON_FIXED_MEMORY_POOLS,
  CONFIGURE_ITRON_INIT_TASK_TABLE_SIZE,
  CONFIGURE_ITRON_INIT_TASK_TABLE_NAME
};
#endif

rtems_configuration_table Configuration = {
  CONFIGURE_EXECUTIVE_RAM_WORK_AREA,
  CONFIGURE_EXECUTIVE_RAM_SIZE,
  CONFIGURE_MAXIMUM_USER_EXTENSIONS + CONFIGURE_NEWLIB_EXTENSION + 
      CONFIGURE_STACK_CHECKER_EXTENSION,
  CONFIGURE_MICROSECONDS_PER_TICK,
  CONFIGURE_TICKS_PER_TIMESLICE,
  CONFIGURE_MAXIMUM_DEVICES,
  sizeof (Device_drivers)/
    sizeof(rtems_driver_address_table),      /* number of device drivers */
  Device_drivers,                            /* pointer to driver table */
  CONFIGURE_NUMBER_OF_INITIAL_EXTENSIONS,    /* number of initial extensions */
  Configuration_Initial_Extensions,          /* pointer to initial extensions */
  CONFIGURE_MULTIPROCESSING_TABLE,           /* pointer to MP config table */
  &Configuration_RTEMS_API,                  /* pointer to RTEMS API config */
#ifdef RTEMS_POSIX_API
  &Configuration_POSIX_API,                  /* pointer to POSIX API config */
#else
  NULL,                                      /* pointer to POSIX API config */
#endif
#ifdef RTEMS_ITRON_API
  &Configuration_ITRON_API                   /* pointer to ITRON API config */
#else
  NULL                                       /* pointer to ITRON API config */
#endif
};
#endif

#endif /* CONFIGURE_HAS_OWN_CONFIGURATION_TABLE */

#ifdef __cplusplus
}
#endif
 
/*
 *  Some warnings and error checking
 */

/*
 *  Make sure a task/thread of some sort is configured
 */

#if (CONFIGURE_MAXIMUM_TASKS == 0) && \
    (CONFIGURE_MAXIMUM_POSIX_THREADS == 0) && \
    (CONFIGURE_MAXIMUM_ADA_TASKS == 0) &&  \
    (CONFIGURE_MAXIMUM_ITRON_TASKS == 0)
#error "CONFIGURATION ERROR: No tasks or threads configured!!"
#endif

/*
 *  Make sure at least one of the initialization task/thread
 *  tables was defined.
 */

#if !defined(CONFIGURE_RTEMS_INIT_TASKS_TABLE) && \
    !defined(CONFIGURE_POSIX_INIT_THREAD_TABLE) && \
    !defined(CONFIGURE_ITRON_INIT_TASK_TABLE)
#error "CONFIGURATION ERROR: No initialization tasks or threads configured!!"
#endif

#endif
/* end of include file */