OpenCores
URL https://opencores.org/ocsvn/or1k/or1k/trunk

Subversion Repositories or1k

[/] [or1k/] [trunk/] [rtems-20020807/] [cpukit/] [sapi/] [include/] [confdefs.h] - Blame information for rev 1026

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 1026 ivang
/*  confdefs.h
2
 *
3
 *  This include file contains the configuration table template that will
4
 *  be instantiated by an application based on the setting of a number
5
 *  of macros.  The macros are documented in the Configuring a System
6
 *  chapter of the Classic API User's Guide
7
 *
8
 *  The model is to estimate the memory required for each configured item
9
 *  and sum those estimates.  The estimate can be too high or too low for
10
 *  a variety of reasons:
11
 *
12
 *  Reasons estimate is too high:
13
 *    + FP contexts (not all tasks are FP)
14
 *
15
 *  Reasons estimate is too low:
16
 *    + stacks greater than minimum size
17
 *    + messages
18
 *    + application must account for device driver resources
19
 *    + application must account for add-on library resource requirements
20
 *
21
 *  NOTE:  Eventually this may be able to take into account some of
22
 *         the above.  This procedure has evolved from just enough to
23
 *         support the RTEMS Test Suites into something that can be
24
 *         used remarkably reliably by most applications.
25
 *
26
 *  COPYRIGHT (c) 1989-2002.
27
 *  On-Line Applications Research Corporation (OAR).
28
 *
29
 *  The license and distribution terms for this file may be
30
 *  found in the file LICENSE in this distribution or at
31
 *  http://www.OARcorp.com/rtems/license.html.
32
 *
33
 *  confdefs.h,v 1.55 2002/07/01 22:31:29 joel Exp
34
 */
35
 
36
#ifndef __CONFIGURATION_TEMPLATE_h
37
#define __CONFIGURATION_TEMPLATE_h
38
 
39
#ifdef __cplusplus
40
extern "C" {
41
#endif
42
 
43
/*
44
 * Include the executive's configuration
45
 */
46
#include <rtems/score/cpuopts.h>
47
 
48
extern rtems_initialization_tasks_table Initialization_tasks[];
49
extern rtems_driver_address_table       Device_drivers[];
50
extern rtems_configuration_table        Configuration;
51
extern rtems_multiprocessing_table      Multiprocessing_configuration;
52
#ifdef RTEMS_POSIX_API
53
extern posix_api_configuration_table    Configuration_POSIX_API;
54
#endif
55
#ifdef RTEMS_ITRON_API
56
extern itron_api_configuration_table    Configuration_ITRON_API;
57
#endif
58
 
59
/*
60
 *  RTEMS C Library and Newlib support
61
 */
62
 
63
#ifdef RTEMS_NEWLIB
64
#define CONFIGURE_NEWLIB_EXTENSION 1
65
#else
66
#define CONFIGURE_NEWLIB_EXTENSION 0
67
#endif
68
 
69
#define CONFIGURE_MALLOC_REGION 1
70
 
71
/*
72
 *  File descriptors managed by libio
73
 */
74
 
75
#ifndef CONFIGURE_LIBIO_MAXIMUM_FILE_DESCRIPTORS
76
#define CONFIGURE_LIBIO_MAXIMUM_FILE_DESCRIPTORS 3
77
#endif
78
 
79
#define CONFIGURE_LIBIO_SEMAPHORES \
80
  (CONFIGURE_LIBIO_MAXIMUM_FILE_DESCRIPTORS + 1)
81
 
82
#ifdef CONFIGURE_INIT
83
unsigned32 rtems_libio_number_iops = CONFIGURE_LIBIO_MAXIMUM_FILE_DESCRIPTORS;
84
#endif
85
 
86
/*
87
 *  Termios resources
88
 */
89
 
90
#ifdef CONFIGURE_TERMIOS_DISABLED
91
#define CONFIGURE_TERMIOS_SEMAPHORES 0
92
#else
93
 
94
#ifndef CONFIGURE_NUMBER_OF_TERMIOS_PORTS
95
#define CONFIGURE_NUMBER_OF_TERMIOS_PORTS 1
96
#endif
97
 
98
#define CONFIGURE_TERMIOS_SEMAPHORES \
99
  ((CONFIGURE_NUMBER_OF_TERMIOS_PORTS * 4) + 1)
100
#endif
101
 
102
/*
103
 *  Mount Table Configuration
104
 */
105
 
106
#include <imfs.h>
107
 
108
#ifdef CONFIGURE_INIT
109
 
110
#ifndef CONFIGURE_HAS_OWN_MOUNT_TABLE
111
rtems_filesystem_mount_table_t configuration_mount_table = {
112
#ifdef CONFIGURE_USE_IMFS_AS_BASE_FILESYSTEM
113
  &IMFS_ops,
114
#else  /* using miniIMFS as base filesystem */
115
  &miniIMFS_ops,
116
#endif
117
  RTEMS_FILESYSTEM_READ_WRITE,
118
  NULL,
119
  NULL
120
};
121
 
122
rtems_filesystem_mount_table_t
123
    *rtems_filesystem_mount_table = &configuration_mount_table;
124
int rtems_filesystem_mount_table_size = 1;
125
#endif
126
 
127
#endif
128
 
129
 
130
/*
131
 *  Stack Checker Requirements
132
 *
133
 *  NOTE: This does not automatically enable reporting at program exit.
134
 */
135
 
136
#ifdef STACK_CHECKER_ON
137
#define CONFIGURE_STACK_CHECKER_EXTENSION 1
138
#else
139
#define CONFIGURE_STACK_CHECKER_EXTENSION 0
140
#endif
141
 
142
/*
143
 *  Interrupt Stack Space
144
 *
145
 *  NOTE: There is currently no way for the application to override
146
 *        the interrupt stack size set by the BSP.
147
 */
148
 
149
#if (CPU_ALLOCATE_INTERRUPT_STACK == 0)
150
#undef CONFIGURE_INTERRUPT_STACK_MEMORY
151
#define CONFIGURE_INTERRUPT_STACK_MEMORY 0
152
#else
153
  #ifndef CONFIGURE_INTERRUPT_STACK_MEMORY
154
  #define CONFIGURE_INTERRUPT_STACK_MEMORY RTEMS_MINIMUM_STACK_SIZE
155
  #endif
156
#endif
157
 
158
/*
159
 *  Default User Initialization Task Table.  This table guarantees that
160
 *  one user initialization table is defined.
161
 */
162
 
163
#ifdef CONFIGURE_RTEMS_INIT_TASKS_TABLE
164
 
165
#ifdef CONFIGURE_HAS_OWN_INIT_TASK_TABLE
166
 
167
/*
168
 *  The user is defining their own table information and setting the
169
 *  appropriate variables.
170
 */
171
 
172
#else
173
 
174
#ifndef CONFIGURE_INIT_TASK_NAME
175
#define CONFIGURE_INIT_TASK_NAME          rtems_build_name( 'U', 'I', '1', ' ' )
176
#endif
177
 
178
#ifndef CONFIGURE_INIT_TASK_STACK_SIZE
179
#define CONFIGURE_INIT_TASK_STACK_SIZE    RTEMS_MINIMUM_STACK_SIZE 
180
#endif
181
 
182
#ifndef CONFIGURE_INIT_TASK_PRIORITY
183
#define CONFIGURE_INIT_TASK_PRIORITY      1
184
#endif
185
 
186
#ifndef CONFIGURE_INIT_TASK_ATTRIBUTES
187
#define CONFIGURE_INIT_TASK_ATTRIBUTES    RTEMS_DEFAULT_ATTRIBUTES 
188
#endif
189
 
190
#ifndef CONFIGURE_INIT_TASK_ENTRY_POINT
191
#define CONFIGURE_INIT_TASK_ENTRY_POINT   Init 
192
#endif
193
 
194
#ifndef CONFIGURE_INIT_TASK_INITIAL_MODES
195
#define CONFIGURE_INIT_TASK_INITIAL_MODES RTEMS_NO_PREEMPT 
196
#endif
197
 
198
#ifndef CONFIGURE_INIT_TASK_ARGUMENTS
199
#define CONFIGURE_INIT_TASK_ARGUMENTS     0 
200
#endif
201
 
202
#ifdef CONFIGURE_INIT
203
rtems_initialization_tasks_table Initialization_tasks[] = {
204
  { CONFIGURE_INIT_TASK_NAME,
205
    CONFIGURE_INIT_TASK_STACK_SIZE,
206
    CONFIGURE_INIT_TASK_PRIORITY,
207
    CONFIGURE_INIT_TASK_ATTRIBUTES,
208
    CONFIGURE_INIT_TASK_ENTRY_POINT,
209
    CONFIGURE_INIT_TASK_INITIAL_MODES,
210
    CONFIGURE_INIT_TASK_ARGUMENTS
211
  }
212
};
213
#endif
214
 
215
#define CONFIGURE_INIT_TASK_TABLE Initialization_tasks
216
 
217
#define CONFIGURE_INIT_TASK_TABLE_SIZE \
218
  sizeof(CONFIGURE_INIT_TASK_TABLE) / sizeof(rtems_initialization_tasks_table)
219
 
220
#endif    /* CONFIGURE_HAS_OWN_INIT_TASK_TABLE */
221
 
222
#else     /* CONFIGURE_RTEMS_INIT_TASKS_TABLE */
223
 
224
#define CONFIGURE_INIT_TASK_TABLE      NULL
225
#define CONFIGURE_INIT_TASK_TABLE_SIZE 0
226
#define CONFIGURE_INIT_TASK_STACK_SIZE 0
227
 
228
#endif
229
 
230
/*
231
 *  Map obsolete names to current ones
232
 *
233
 *  NOTE: These should be obsoleted in a future release.
234
 */
235
 
236
#ifdef CONFIGURE_TEST_NEEDS_TIMER_DRIVER
237
#define CONFIGURE_APPLICATION_NEEDS_TIMER_DRIVER
238
#endif
239
#ifdef CONFIGURE_TEST_NEEDS_CONSOLE_DRIVER
240
#define CONFIGURE_APPLICATION_NEEDS_CONSOLE_DRIVER
241
#endif 
242
#ifdef CONFIGURE_TEST_NEEDS_CLOCK_DRIVER
243
#define CONFIGURE_APPLICATION_NEEDS_CLOCK_DRIVER
244
#endif 
245
#ifdef CONFIGURE_TEST_NEEDS_RTC_DRIVER
246
#define CONFIGURE_APPLICATION_NEEDS_RTC_DRIVER
247
#endif 
248
#ifdef CONFIGURE_TEST_NEEDS_STUB_DRIVER
249
#define CONFIGURE_APPLICATION_NEEDS_STUB_DRIVER
250
#endif
251
 
252
 
253
/*
254
 *  Default Device Driver Table.  Each driver needed by the test is explicitly
255
 *  choosen by that test.  There is always a null driver entry.
256
 */
257
 
258
#define NULL_DRIVER_TABLE_ENTRY \
259
 { NULL, NULL, NULL, NULL, NULL, NULL }
260
 
261
#ifdef CONFIGURE_APPLICATION_NEEDS_CONSOLE_DRIVER
262
#include <console.h>
263
#endif
264
 
265
#ifdef CONFIGURE_APPLICATION_NEEDS_CLOCK_DRIVER
266
#include <clockdrv.h>
267
#endif
268
 
269
#ifdef CONFIGURE_APPLICATION_NEEDS_TIMER_DRIVER
270
#include <timerdrv.h>
271
#endif
272
 
273
#ifdef CONFIGURE_APPLICATION_NEEDS_RTC_DRIVER
274
#include <rtc.h>
275
#endif
276
 
277
#ifdef CONFIGURE_APPLICATION_NEEDS_STUB_DRIVER
278
#include <rtems/devnull.h>
279
#endif
280
 
281
#ifndef CONFIGURE_HAS_OWN_DEVICE_DRIVER_TABLE
282
 
283
#ifdef CONFIGURE_INIT
284
rtems_driver_address_table Device_drivers[] = {
285
#ifdef CONFIGURE_APPLICATION_NEEDS_CONSOLE_DRIVER
286
  CONSOLE_DRIVER_TABLE_ENTRY,
287
#endif
288
#ifdef CONFIGURE_APPLICATION_NEEDS_CLOCK_DRIVER
289
  CLOCK_DRIVER_TABLE_ENTRY,
290
#endif
291
#ifdef CONFIGURE_APPLICATION_NEEDS_RTC_DRIVER
292
  RTC_DRIVER_TABLE_ENTRY,
293
#endif
294
#ifdef CONFIGURE_APPLICATION_NEEDS_STUB_DRIVER
295
  DEVNULL_DRIVER_TABLE_ENTRY,
296
#endif
297
#ifdef CONFIGURE_APPLICATION_NEEDS_NULL_DRIVER
298
  NULL_DRIVER_TABLE_ENTRY
299
#elif !defined(CONFIGURE_APPLICATION_NEEDS_CONSOLE_DRIVER) && \
300
    !defined(CONFIGURE_APPLICATION_NEEDS_CLOCK_DRIVER) && \
301
    !defined(CONFIGURE_APPLICATION_NEEDS_RTC_DRIVER) && \
302
    !defined(CONFIGURE_APPLICATION_NEEDS_STUB_DRIVER)
303
  NULL_DRIVER_TABLE_ENTRY
304
#endif
305
};
306
#endif
307
 
308
#endif  /* CONFIGURE_HAS_OWN_DEVICE_DRIVER_TABLE */
309
 
310
/*
311
 *  Default the number of drivers per node.  This value may be
312
 *  overridden by the user.
313
 */
314
 
315
#define CONFIGURE_NUMBER_OF_DRIVERS \
316
  ((sizeof(Device_drivers) / sizeof(rtems_driver_address_table)))
317
 
318
#ifndef CONFIGURE_MAXIMUM_DRIVERS
319
#define CONFIGURE_MAXIMUM_DRIVERS CONFIGURE_NUMBER_OF_DRIVERS
320
#endif
321
 
322
/*
323
 *  Default the number of devices per device driver.  This value may be
324
 *  overridden by the user.
325
 */
326
 
327
#ifndef CONFIGURE_MAXIMUM_DEVICES
328
#define CONFIGURE_MAXIMUM_DEVICES   20
329
#endif
330
 
331
/*
332
 *  Default Multiprocessing Configuration Table.  The defaults are
333
 *  appropriate for most of the RTEMS Multiprocessor Test Suite.  Each
334
 *  value may be overridden within each test to customize the environment.
335
 */
336
 
337
#ifdef CONFIGURE_MP_APPLICATION
338
#ifndef CONFIGURE_HAS_OWN_MULTIPROCESING_TABLE
339
 
340
#ifndef CONFIGURE_MP_NODE_NUMBER
341
#define CONFIGURE_MP_NODE_NUMBER                NODE_NUMBER
342
#endif
343
 
344
#ifndef CONFIGURE_MP_MAXIMUM_NODES
345
#define CONFIGURE_MP_MAXIMUM_NODES              2
346
#endif
347
 
348
#ifndef CONFIGURE_MP_MAXIMUM_GLOBAL_OBJECTS
349
#define CONFIGURE_MP_MAXIMUM_GLOBAL_OBJECTS     32
350
#endif
351
 
352
#ifndef CONFIGURE_MP_MAXIMUM_PROXIES
353
#define CONFIGURE_MP_MAXIMUM_PROXIES            32
354
#endif
355
 
356
#ifndef CONFIGURE_MP_MPCI_TABLE_POINTER
357
#include <mpci.h>
358
#define CONFIGURE_MP_MPCI_TABLE_POINTER         &MPCI_table
359
#endif
360
 
361
#ifdef CONFIGURE_INIT
362
rtems_multiprocessing_table Multiprocessing_configuration = {
363
  CONFIGURE_MP_NODE_NUMBER,              /* local node number */
364
  CONFIGURE_MP_MAXIMUM_NODES,            /* maximum # nodes in system */
365
  CONFIGURE_MP_MAXIMUM_GLOBAL_OBJECTS,   /* maximum # global objects */
366
  CONFIGURE_MP_MAXIMUM_PROXIES,          /* maximum # proxies */
367
  CONFIGURE_MP_MPCI_TABLE_POINTER        /* pointer to MPCI config table */
368
};
369
#endif
370
 
371
#define CONFIGURE_MULTIPROCESSING_TABLE    &Multiprocessing_configuration
372
 
373
#endif /* CONFIGURE_HAS_OWN_MULTIPROCESING_TABLE */
374
 
375
#else
376
 
377
#define CONFIGURE_MULTIPROCESSING_TABLE    NULL
378
 
379
#endif /* CONFIGURE_MP_APPLICATION */
380
 
381
/*
382
 *  Default Configuration Table.
383
 */
384
 
385
#ifndef CONFIGURE_HAS_OWN_CONFIGURATION_TABLE
386
 
387
#ifndef CONFIGURE_EXECUTIVE_RAM_WORK_AREA
388
#define CONFIGURE_EXECUTIVE_RAM_WORK_AREA     NULL
389
#endif
390
 
391
#ifndef CONFIGURE_MAXIMUM_TASKS
392
#define CONFIGURE_MAXIMUM_TASKS               0
393
#endif
394
 
395
#ifndef CONFIGURE_MAXIMUM_TIMERS
396
#define CONFIGURE_MAXIMUM_TIMERS              0
397
#endif
398
 
399
#ifndef CONFIGURE_MAXIMUM_SEMAPHORES
400
#define CONFIGURE_MAXIMUM_SEMAPHORES          0
401
#endif
402
 
403
#ifndef CONFIGURE_MAXIMUM_MESSAGE_QUEUES
404
#define CONFIGURE_MAXIMUM_MESSAGE_QUEUES      0
405
#endif
406
 
407
#ifndef CONFIGURE_MAXIMUM_PARTITIONS
408
#define CONFIGURE_MAXIMUM_PARTITIONS          0
409
#endif
410
 
411
#ifndef CONFIGURE_MAXIMUM_REGIONS
412
#define CONFIGURE_MAXIMUM_REGIONS             0
413
#endif
414
 
415
#ifndef CONFIGURE_MAXIMUM_PORTS
416
#define CONFIGURE_MAXIMUM_PORTS               0
417
#endif
418
 
419
#ifndef CONFIGURE_MAXIMUM_PERIODS
420
#define CONFIGURE_MAXIMUM_PERIODS             0
421
#endif
422
 
423
#ifndef CONFIGURE_MAXIMUM_USER_EXTENSIONS
424
#define CONFIGURE_MAXIMUM_USER_EXTENSIONS     0
425
#endif
426
 
427
#ifndef CONFIGURE_MICROSECONDS_PER_TICK 
428
#define CONFIGURE_MICROSECONDS_PER_TICK RTEMS_MILLISECONDS_TO_MICROSECONDS(10)
429
#endif
430
 
431
#ifndef CONFIGURE_TICKS_PER_TIMESLICE
432
#define CONFIGURE_TICKS_PER_TIMESLICE        50
433
#endif
434
 
435
/*
436
 *  Initial Extension Set
437
 */
438
 
439
#ifdef CONFIGURE_INIT
440
#ifdef STACK_CHECKER_ON
441
#include <rtems/stackchk.h>
442
#endif
443
 
444
#if defined(CONFIGURE_INITIAL_EXTENSIONS) || \
445
    defined(STACK_CHECKER_ON)
446
rtems_extensions_table Configuration_Initial_Extensions[] = {
447
#ifdef CONFIGURE_INITIAL_EXTENSIONS
448
    CONFIGURE_INITIAL_EXTENSIONS,
449
#endif
450
#ifdef STACK_CHECKER_ON
451
    STACK_CHECKER_EXTENSION,
452
#endif
453
};
454
 
455
#define CONFIGURE_INITIAL_EXTENSION_TABLE Configuration_Initial_Extensions
456
#define CONFIGURE_NUMBER_OF_INITIAL_EXTENSIONS \
457
  ((sizeof(Configuration_Initial_Extensions) / \
458
    sizeof(rtems_extensions_table)))
459
#else
460
#define CONFIGURE_INITIAL_EXTENSION_TABLE NULL
461
#define CONFIGURE_NUMBER_OF_INITIAL_EXTENSIONS 0
462
#endif
463
 
464
 
465
#endif
466
 
467
/*
468
 *  POSIX API Configuration Parameters
469
 */
470
 
471
#ifdef RTEMS_POSIX_API
472
 
473
#include <sys/types.h>
474
#include <signal.h>
475
#include <mqueue.h>
476
#include <rtems/posix/cond.h>
477
#include <rtems/posix/mqueue.h>
478
#include <rtems/posix/mutex.h>
479
#include <rtems/posix/key.h>
480
#include <rtems/posix/psignal.h>
481
#include <rtems/posix/semaphore.h>
482
#include <rtems/posix/threadsup.h>
483
 
484
#ifndef CONFIGURE_MAXIMUM_POSIX_THREADS
485
#define CONFIGURE_MAXIMUM_POSIX_THREADS      0
486
#endif
487
 
488
#ifndef CONFIGURE_MAXIMUM_POSIX_MUTEXES
489
#define CONFIGURE_MAXIMUM_POSIX_MUTEXES      0
490
#endif
491
 
492
#ifndef CONFIGURE_MAXIMUM_POSIX_CONDITION_VARIABLES
493
#define CONFIGURE_MAXIMUM_POSIX_CONDITION_VARIABLES  0
494
#endif
495
 
496
#ifndef CONFIGURE_MAXIMUM_POSIX_KEYS
497
#define CONFIGURE_MAXIMUM_POSIX_KEYS         0
498
#endif
499
 
500
#ifndef CONFIGURE_MAXIMUM_POSIX_TIMERS
501
#define CONFIGURE_MAXIMUM_POSIX_TIMERS 0
502
#endif
503
 
504
#ifndef CONFIGURE_MAXIMUM_POSIX_QUEUED_SIGNALS
505
#define CONFIGURE_MAXIMUM_POSIX_QUEUED_SIGNALS 0
506
#endif
507
 
508
#ifndef CONFIGURE_MAXIMUM_POSIX_MESSAGE_QUEUES
509
#define CONFIGURE_MAXIMUM_POSIX_MESSAGE_QUEUES 0
510
#endif
511
 
512
#ifndef CONFIGURE_MAXIMUM_POSIX_SEMAPHORES
513
#define CONFIGURE_MAXIMUM_POSIX_SEMAPHORES 0
514
#endif
515
 
516
#ifdef CONFIGURE_POSIX_INIT_THREAD_TABLE
517
 
518
#ifdef CONFIGURE_POSIX_HAS_OWN_INIT_THREAD_TABLE
519
 
520
/*
521
 *  The user is defining their own table information and setting the
522
 *  appropriate variables for the POSIX Initialization Thread Table.
523
 */
524
 
525
#else
526
 
527
#ifndef CONFIGURE_POSIX_INIT_THREAD_ENTRY_POINT
528
#define CONFIGURE_POSIX_INIT_THREAD_ENTRY_POINT   POSIX_Init 
529
#endif
530
 
531
#ifndef CONFIGURE_POSIX_INIT_THREAD_STACK_SIZE
532
#define CONFIGURE_POSIX_INIT_THREAD_STACK_SIZE    (RTEMS_MINIMUM_STACK_SIZE * 2)
533
#endif
534
 
535
#ifdef CONFIGURE_INIT
536
posix_initialization_threads_table POSIX_Initialization_threads[] = {
537
  { CONFIGURE_POSIX_INIT_THREAD_ENTRY_POINT, \
538
      CONFIGURE_POSIX_INIT_THREAD_STACK_SIZE }
539
};
540
#endif
541
 
542
#define CONFIGURE_POSIX_INIT_THREAD_TABLE_NAME POSIX_Initialization_threads
543
 
544
#define CONFIGURE_POSIX_INIT_THREAD_TABLE_SIZE \
545
  sizeof(CONFIGURE_POSIX_INIT_THREAD_TABLE_NAME) / \
546
      sizeof(posix_initialization_threads_table)
547
 
548
#endif    /* CONFIGURE_POSIX_HAS_OWN_INIT_TASK_TABLE */
549
 
550
#else     /* CONFIGURE_POSIX_INIT_THREAD_TABLE */
551
 
552
#define CONFIGURE_POSIX_INIT_THREAD_TABLE_NAME NULL
553
#define CONFIGURE_POSIX_INIT_THREAD_TABLE_SIZE 0
554
 
555
#endif
556
 
557
#define CONFIGURE_MEMORY_PER_TASK_FOR_POSIX_API \
558
  ( \
559
    sizeof (POSIX_API_Control) + \
560
   (sizeof (void *) * (CONFIGURE_GNAT_KEYS + CONFIGURE_MAXIMUM_POSIX_KEYS)) \
561
  )
562
 
563
#define CONFIGURE_MEMORY_FOR_POSIX_MUTEXES(_mutexes) \
564
  ((_mutexes) * \
565
   ( sizeof(POSIX_Mutex_Control) + CONFIGURE_OBJECT_TABLE_STUFF ) )
566
 
567
#define CONFIGURE_MEMORY_FOR_POSIX_CONDITION_VARIABLES(_condition_variables) \
568
  ((_condition_variables) * \
569
   ( sizeof(POSIX_Condition_variables_Control) + \
570
        CONFIGURE_OBJECT_TABLE_STUFF ) )
571
 
572
#define CONFIGURE_MEMORY_FOR_POSIX_KEYS(_keys) \
573
  ((_keys) * \
574
   ( sizeof(POSIX_Keys_Control) + CONFIGURE_OBJECT_TABLE_STUFF ) )
575
 
576
#define CONFIGURE_MEMORY_FOR_POSIX_TIMERS(_timers) \
577
  ((_timers) * \
578
   ( 0 ) )
579
 
580
#define CONFIGURE_MEMORY_FOR_POSIX_QUEUED_SIGNALS(_queued_signals) \
581
  ((_queued_signals) * \
582
   ( sizeof(POSIX_signals_Siginfo_node) + CONFIGURE_OBJECT_TABLE_STUFF ) )
583
 
584
#define CONFIGURE_MEMORY_FOR_POSIX_MESSAGE_QUEUES(_message_queues) \
585
  ((_message_queues) * \
586
   ( sizeof( POSIX_Message_queue_Control) + CONFIGURE_OBJECT_TABLE_STUFF ) )
587
#define CONFIGURE_MEMORY_FOR_POSIX_SEMAPHORES(_semaphores) \
588
  ((_semaphores) * \
589
   ( sizeof( POSIX_Semaphore_Control) + CONFIGURE_OBJECT_TABLE_STUFF ) )
590
 
591
 
592
#define CONFIGURE_MEMORY_FOR_POSIX \
593
  ( \
594
    CONFIGURE_MEMORY_FOR_POSIX_MUTEXES( CONFIGURE_MAXIMUM_POSIX_MUTEXES ) + \
595
    CONFIGURE_MEMORY_FOR_POSIX_CONDITION_VARIABLES( \
596
        CONFIGURE_MAXIMUM_POSIX_CONDITION_VARIABLES ) + \
597
    CONFIGURE_MEMORY_FOR_POSIX_KEYS( CONFIGURE_MAXIMUM_POSIX_KEYS ) + \
598
    CONFIGURE_MEMORY_FOR_POSIX_QUEUED_SIGNALS( \
599
        CONFIGURE_MAXIMUM_POSIX_QUEUED_SIGNALS ) + \
600
    CONFIGURE_MEMORY_FOR_POSIX_MESSAGE_QUEUES( \
601
        CONFIGURE_MAXIMUM_POSIX_MESSAGE_QUEUES ) + \
602
    CONFIGURE_MEMORY_FOR_POSIX_SEMAPHORES( \
603
        CONFIGURE_MAXIMUM_POSIX_SEMAPHORES ) + \
604
    (CONFIGURE_POSIX_INIT_THREAD_STACK_SIZE) \
605
   )
606
 
607
 
608
#else
609
 
610
#define CONFIGURE_MAXIMUM_POSIX_THREADS         0
611
#define CONFIGURE_MEMORY_PER_TASK_FOR_POSIX_API 0
612
#define CONFIGURE_MEMORY_FOR_POSIX              0
613
 
614
 
615
#endif    /* RTEMS_POSIX_API */
616
 
617
#ifndef CONFIGURE_POSIX_INIT_THREAD_STACK_SIZE
618
#define CONFIGURE_POSIX_INIT_THREAD_STACK_SIZE    0
619
#endif
620
 
621
/*
622
 *  ITRON API Configuration Parameters
623
 */
624
 
625
#ifdef RTEMS_ITRON_API
626
 
627
#include <itron.h>
628
#include <rtems/itron/config.h>
629
#include <rtems/itron/eventflags.h>
630
#include <rtems/itron/fmempool.h>
631
#include <rtems/itron/mbox.h>
632
#include <rtems/itron/msgbuffer.h>
633
#include <rtems/itron/port.h>
634
#include <rtems/itron/semaphore.h>
635
#include <rtems/itron/task.h>
636
#include <rtems/itron/vmempool.h>
637
 
638
#ifndef CONFIGURE_MAXIMUM_ITRON_TASKS
639
#define CONFIGURE_MAXIMUM_ITRON_TASKS      0
640
#endif
641
 
642
#ifndef CONFIGURE_MAXIMUM_ITRON_SEMAPHORES
643
#define CONFIGURE_MAXIMUM_ITRON_SEMAPHORES   0
644
#endif
645
 
646
#ifndef CONFIGURE_MAXIMUM_ITRON_EVENTFLAGS
647
#define CONFIGURE_MAXIMUM_ITRON_EVENTFLAGS   0
648
#endif
649
 
650
#ifndef CONFIGURE_MAXIMUM_ITRON_MAILBOXES
651
#define CONFIGURE_MAXIMUM_ITRON_MAILBOXES   0
652
#endif
653
 
654
#ifndef CONFIGURE_MAXIMUM_ITRON_MESSAGE_BUFFERS
655
#define CONFIGURE_MAXIMUM_ITRON_MESSAGE_BUFFERS   0
656
#endif
657
 
658
#ifndef CONFIGURE_MAXIMUM_ITRON_PORTS
659
#define CONFIGURE_MAXIMUM_ITRON_PORTS   0
660
#endif
661
 
662
#ifndef CONFIGURE_MAXIMUM_ITRON_MEMORY_POOLS
663
#define CONFIGURE_MAXIMUM_ITRON_MEMORY_POOLS   0
664
#endif
665
 
666
#ifndef CONFIGURE_MAXIMUM_ITRON_FIXED_MEMORY_POOLS
667
#define CONFIGURE_MAXIMUM_ITRON_FIXED_MEMORY_POOLS   0
668
#endif
669
 
670
#ifdef CONFIGURE_ITRON_INIT_TASK_TABLE
671
 
672
#ifdef CONFIGURE_ITRON_HAS_OWN_INIT_TASK_TABLE
673
 
674
/*
675
 *  The user is defining their own table information and setting the
676
 *  appropriate variables for the ITRON Initialization Task Table.
677
 */
678
 
679
#else
680
 
681
#ifndef CONFIGURE_ITRON_INIT_TASK_ENTRY_POINT
682
#define CONFIGURE_ITRON_INIT_TASK_ENTRY_POINT   ITRON_Init
683
#endif
684
 
685
#ifndef CONFIGURE_ITRON_INIT_TASK_ATTRIBUTES
686
#define CONFIGURE_ITRON_INIT_TASK_ATTRIBUTES    TA_HLNG
687
#endif
688
 
689
#ifndef CONFIGURE_ITRON_INIT_TASK_PRIORITY
690
#define CONFIGURE_ITRON_INIT_TASK_PRIORITY      1
691
#endif
692
 
693
#ifndef CONFIGURE_ITRON_INIT_TASK_STACK_SIZE
694
#define CONFIGURE_ITRON_INIT_TASK_STACK_SIZE    RTEMS_MINIMUM_STACK_SIZE
695
#endif
696
 
697
#ifdef CONFIGURE_INIT
698
itron_initialization_tasks_table ITRON_Initialization_tasks[] = {
699
  { 1,                                    /* ID */
700
    { (VP) 0,                                /* exinfo */
701
      CONFIGURE_ITRON_INIT_TASK_ATTRIBUTES,  /* task attributes */
702
      CONFIGURE_ITRON_INIT_TASK_ENTRY_POINT, /* task start address */
703
      CONFIGURE_ITRON_INIT_TASK_PRIORITY,    /* initial task priority */
704
      CONFIGURE_ITRON_INIT_TASK_STACK_SIZE   /* stack size */
705
    }
706
  }
707
};
708
#endif
709
 
710
#define CONFIGURE_ITRON_INIT_TASK_TABLE_NAME ITRON_Initialization_tasks
711
 
712
#define CONFIGURE_ITRON_INIT_TASK_TABLE_SIZE \
713
  sizeof(CONFIGURE_ITRON_INIT_TASK_TABLE_NAME) / \
714
      sizeof(itron_initialization_tasks_table)
715
 
716
#endif    /* CONFIGURE_ITRON_HAS_OWN_INIT_TASK_TABLE */
717
 
718
#else     /* CONFIGURE_ITRON_INIT_TASK_TABLE */
719
 
720
#define CONFIGURE_ITRON_INIT_TASK_TABLE_NAME NULL
721
#define CONFIGURE_ITRON_INIT_TASK_TABLE_SIZE 0
722
 
723
#endif
724
 
725
#define CONFIGURE_MEMORY_PER_TASK_FOR_ITRON_API \
726
  ( \
727
    sizeof (ITRON_API_Control) \
728
  )
729
 
730
#define CONFIGURE_MEMORY_FOR_ITRON_SEMAPHORES(_semaphores) \
731
  ((_semaphores) * \
732
   ( sizeof(ITRON_Semaphore_Control) + CONFIGURE_OBJECT_TABLE_STUFF ) )
733
 
734
#define CONFIGURE_MEMORY_FOR_ITRON_EVENTFLAGS(_eventflags) \
735
  ((_eventflags) * \
736
   ( sizeof(ITRON_Eventflags_Control) + CONFIGURE_OBJECT_TABLE_STUFF ) )
737
 
738
#define CONFIGURE_MEMORY_FOR_ITRON_MAILBOXES(_mailboxes) \
739
  ((_mailboxes) * \
740
   ( sizeof(ITRON_Mailbox_Control) + CONFIGURE_OBJECT_TABLE_STUFF ) )
741
 
742
#define CONFIGURE_MEMORY_FOR_ITRON_MESSAGE_BUFFERS(_message_buffers) \
743
  ((_message_buffers) * \
744
   ( sizeof(ITRON_Message_buffer_Control) + CONFIGURE_OBJECT_TABLE_STUFF ) )
745
 
746
#define CONFIGURE_MEMORY_FOR_ITRON_PORTS(_ports) \
747
  ((_ports) * \
748
   ( sizeof(ITRON_Port_Control) + CONFIGURE_OBJECT_TABLE_STUFF ) )
749
 
750
#define CONFIGURE_MEMORY_FOR_ITRON_MEMORY_POOLS(_memory_pools) \
751
  ((_memory_pools) * \
752
   (sizeof(ITRON_Variable_memory_pool_Control) + CONFIGURE_OBJECT_TABLE_STUFF))
753
 
754
#define CONFIGURE_MEMORY_FOR_ITRON_FIXED_MEMORY_POOLS(_fixed_memory_pools) \
755
  ((_fixed_memory_pools) * \
756
   ( sizeof(ITRON_Fixed_memory_pool_Control) + CONFIGURE_OBJECT_TABLE_STUFF ) )
757
 
758
#ifndef CONFIGURE_ITRON_INIT_TASK_STACK_SIZE
759
#define CONFIGURE_ITRON_INIT_TASK_STACK_SIZE (RTEMS_MINIMUM_STACK_SIZE * 2)
760
#endif
761
 
762
 
763
#define CONFIGURE_MEMORY_FOR_ITRON \
764
  ( \
765
    CONFIGURE_MEMORY_FOR_ITRON_SEMAPHORES( \
766
        CONFIGURE_MAXIMUM_ITRON_SEMAPHORES ) + \
767
    CONFIGURE_MEMORY_FOR_ITRON_EVENTFLAGS( \
768
        CONFIGURE_MAXIMUM_ITRON_EVENTFLAGS ) + \
769
    CONFIGURE_MEMORY_FOR_ITRON_MAILBOXES( \
770
        CONFIGURE_MAXIMUM_ITRON_MAILBOXES ) + \
771
    CONFIGURE_MEMORY_FOR_ITRON_MESSAGE_BUFFERS( \
772
        CONFIGURE_MAXIMUM_ITRON_MESSAGE_BUFFERS ) + \
773
    CONFIGURE_MEMORY_FOR_ITRON_PORTS( \
774
        CONFIGURE_MAXIMUM_ITRON_PORTS ) + \
775
    CONFIGURE_MEMORY_FOR_ITRON_MEMORY_POOLS( \
776
        CONFIGURE_MAXIMUM_ITRON_MEMORY_POOLS ) + \
777
    CONFIGURE_MEMORY_FOR_ITRON_FIXED_MEMORY_POOLS( \
778
        CONFIGURE_MAXIMUM_ITRON_FIXED_MEMORY_POOLS ) + \
779
    CONFIGURE_ITRON_INIT_TASK_STACK_SIZE \
780
   )
781
 
782
 
783
#else
784
 
785
#define CONFIGURE_MAXIMUM_ITRON_TASKS               0
786
#define CONFIGURE_MAXIMUM_ITRON_SEMAPHORES          0
787
#define CONFIGURE_MAXIMUM_ITRON_EVENTFLAGS          0
788
#define CONFIGURE_MAXIMUM_ITRON_MAILBOXES           0
789
#define CONFIGURE_MAXIMUM_ITRON_MESSAGE_BUFFERS     0
790
#define CONFIGURE_MAXIMUM_ITRON_PORTS               0
791
#define CONFIGURE_MAXIMUM_ITRON_MEMORY_POOLS        0
792
#define CONFIGURE_MAXIMUM_ITRON_FIXED_MEMORY_POOLS  0
793
#define CONFIGURE_MEMORY_PER_TASK_FOR_ITRON_API     0
794
#define CONFIGURE_MEMORY_FOR_ITRON                  0
795
 
796
#endif    /* RTEMS_ITRON_API */
797
 
798
 
799
/*
800
 *  Calculate the RAM size based on the maximum number of objects configured.
801
 */
802
 
803
#ifndef CONFIGURE_EXECUTIVE_RAM_SIZE
804
 
805
#define CONFIGURE_OBJECT_TABLE_STUFF \
806
  ( sizeof(Objects_Control *) + sizeof(rtems_name *) + sizeof(rtems_name) )
807
 
808
#define CONFIGURE_MEMORY_FOR_TASKS(_tasks) \
809
  (((_tasks) + 1 ) * \
810
   ((sizeof(Thread_Control) + CONTEXT_FP_SIZE + \
811
      STACK_MINIMUM_SIZE + sizeof( RTEMS_API_Control ) + \
812
      CONFIGURE_MEMORY_PER_TASK_FOR_POSIX_API + \
813
      CONFIGURE_MEMORY_PER_TASK_FOR_ITRON_API + \
814
      CONFIGURE_OBJECT_TABLE_STUFF)) \
815
  )
816
 
817
#define CONFIGURE_MEMORY_FOR_TIMERS(_timers) \
818
  ((_timers) * ( sizeof(Timer_Control) + CONFIGURE_OBJECT_TABLE_STUFF ) )
819
 
820
#define CONFIGURE_MEMORY_FOR_SEMAPHORES(_semaphores) \
821
  ((_semaphores) * \
822
   ( sizeof(Semaphore_Control) + CONFIGURE_OBJECT_TABLE_STUFF ) )
823
 
824
#define CONFIGURE_MEMORY_FOR_MESSAGE_QUEUES(_queues) \
825
  ( (_queues) * \
826
    ( sizeof(Message_queue_Control) + CONFIGURE_OBJECT_TABLE_STUFF ) )
827
 
828
#define CONFIGURE_MEMORY_FOR_PARTITIONS(_partitions) \
829
  ( (_partitions) * \
830
    ( sizeof(Partition_Control) + CONFIGURE_OBJECT_TABLE_STUFF ) )
831
 
832
#define CONFIGURE_MEMORY_FOR_REGIONS(_regions) \
833
  ( (_regions) * \
834
    ( sizeof(Region_Control) + CONFIGURE_OBJECT_TABLE_STUFF ) )
835
 
836
#define CONFIGURE_MEMORY_FOR_PORTS(_ports) \
837
  ( (_ports) * \
838
    ( sizeof(Dual_ported_memory_Control) + CONFIGURE_OBJECT_TABLE_STUFF ) )
839
 
840
#define CONFIGURE_MEMORY_FOR_PERIODS(_periods) \
841
  ( (_periods) * \
842
    ( sizeof(Rate_monotonic_Control) + CONFIGURE_OBJECT_TABLE_STUFF ) )
843
 
844
#define CONFIGURE_MEMORY_FOR_USER_EXTENSIONS(_extensions) \
845
  ( (_extensions) * \
846
    ( sizeof(Extension_Control) + CONFIGURE_OBJECT_TABLE_STUFF ) )
847
 
848
#define CONFIGURE_MEMORY_FOR_DEVICES(_devices) \
849
  (((_devices) + 1) * ( sizeof(rtems_driver_name_t) ) )
850
 
851
#ifdef CONFIGURE_MP_APPLICATION
852
 
853
#ifndef CONFIGURE_HAS_OWN_MULTIPROCESING_TABLE
854
 
855
#define CONFIGURE_MEMORY_FOR_PROXIES(_proxies) \
856
  ( ((_proxies) + 1) * ( sizeof(Thread_Proxy_control) )  )
857
 
858
#define CONFIGURE_MEMORY_FOR_GLOBAL_OBJECTS(_global_objects) \
859
  ((_global_objects)  * ( sizeof(Objects_MP_Control) )  )
860
 
861
#define CONFIGURE_MEMORY_FOR_MP \
862
  ( CONFIGURE_MEMORY_FOR_PROXIES(CONFIGURE_MP_MAXIMUM_PROXIES) + \
863
    CONFIGURE_MEMORY_FOR_GLOBAL_OBJECTS(CONFIGURE_MP_MAXIMUM_GLOBAL_OBJECTS) + \
864
    CONFIGURE_MEMORY_FOR_TASKS(1) \
865
  )
866
 
867
#endif  /* CONFIGURE_HAS_OWN_MULTIPROCESING_TABLE */
868
 
869
#else
870
 
871
#define CONFIGURE_MEMORY_FOR_MP  0
872
 
873
#endif
874
 
875
#ifndef CONFIGURE_MEMORY_OVERHEAD
876
#define CONFIGURE_MEMORY_OVERHEAD 0
877
#endif
878
 
879
#ifndef CONFIGURE_EXTRA_TASK_STACKS
880
#define CONFIGURE_EXTRA_TASK_STACKS 0
881
#endif
882
 
883
#define CONFIGURE_MEMORY_FOR_SYSTEM_OVERHEAD \
884
  ( CONFIGURE_MEMORY_FOR_TASKS(1) +    /* IDLE */ \
885
    (256 * 12) +                       /* Ready chains */ \
886
    256        +                       /* name/ptr table overhead */ \
887
    CONFIGURE_INTERRUPT_STACK_MEMORY   /* interrupt stack */ \
888
  )
889
 
890
/*
891
 *  Now account for any extra memory that initialization tasks or threads
892
 *  may have requested.
893
 */
894
 
895
#ifdef RTEMS_POSIX_API
896
#define CONFIGURE_INITIALIZATION_THREADS_STACKS_POSIX_PART \
897
    (CONFIGURE_POSIX_INIT_THREAD_STACK_SIZE - RTEMS_MINIMUM_STACK_SIZE)
898
#else
899
#define CONFIGURE_INITIALIZATION_THREADS_STACKS_POSIX_PART 0
900
#endif
901
#ifdef RTEMS_ITRON_API
902
#define CONFIGURE_INITIALIZATION_THREADS_STACKS_ITRON_PART \
903
    (CONFIGURE_ITRON_INIT_TASK_STACK_SIZE - RTEMS_MINIMUM_STACK_SIZE)
904
#else
905
#define CONFIGURE_INITIALIZATION_THREADS_STACKS_ITRON_PART 0
906
#endif
907
 
908
#define CONFIGURE_INITIALIZATION_THREADS_STACKS \
909
   ((CONFIGURE_INIT_TASK_STACK_SIZE - RTEMS_MINIMUM_STACK_SIZE) + \
910
    CONFIGURE_INITIALIZATION_THREADS_STACKS_POSIX_PART + \
911
    CONFIGURE_INITIALIZATION_THREADS_STACKS_ITRON_PART)
912
 
913
#define CONFIGURE_EXECUTIVE_RAM_SIZE \
914
(( CONFIGURE_MEMORY_FOR_POSIX + \
915
   CONFIGURE_MEMORY_FOR_ITRON + \
916
   CONFIGURE_MEMORY_FOR_TASKS(CONFIGURE_MAXIMUM_TASKS + \
917
      CONFIGURE_MAXIMUM_POSIX_THREADS + CONFIGURE_MAXIMUM_ADA_TASKS + \
918
      CONFIGURE_MAXIMUM_ITRON_TASKS ) + \
919
   CONFIGURE_INITIALIZATION_THREADS_STACKS + \
920
   CONFIGURE_MEMORY_FOR_TIMERS(CONFIGURE_MAXIMUM_TIMERS) + \
921
   CONFIGURE_MEMORY_FOR_SEMAPHORES(CONFIGURE_MAXIMUM_SEMAPHORES + \
922
     CONFIGURE_LIBIO_SEMAPHORES + CONFIGURE_TERMIOS_SEMAPHORES) + \
923
   CONFIGURE_MEMORY_FOR_MESSAGE_QUEUES(CONFIGURE_MAXIMUM_MESSAGE_QUEUES) + \
924
   CONFIGURE_MEMORY_FOR_PARTITIONS(CONFIGURE_MAXIMUM_PARTITIONS) + \
925
   CONFIGURE_MEMORY_FOR_REGIONS( \
926
      CONFIGURE_MAXIMUM_REGIONS + CONFIGURE_MALLOC_REGION ) + \
927
   CONFIGURE_MEMORY_FOR_PORTS(CONFIGURE_MAXIMUM_PORTS) + \
928
   CONFIGURE_MEMORY_FOR_PERIODS(CONFIGURE_MAXIMUM_PERIODS) + \
929
   CONFIGURE_MEMORY_FOR_USER_EXTENSIONS( \
930
      CONFIGURE_MAXIMUM_USER_EXTENSIONS + CONFIGURE_NEWLIB_EXTENSION + \
931
      CONFIGURE_STACK_CHECKER_EXTENSION ) + \
932
   CONFIGURE_MEMORY_FOR_DEVICES(CONFIGURE_MAXIMUM_DEVICES) + \
933
   CONFIGURE_MEMORY_FOR_MP + \
934
   CONFIGURE_MEMORY_FOR_SYSTEM_OVERHEAD + \
935
   (((CONFIGURE_MEMORY_OVERHEAD)+1) * 1024) + \
936
   (CONFIGURE_EXTRA_TASK_STACKS) + (CONFIGURE_ADA_TASKS_STACK) \
937
) & 0xfffffc00)
938
#endif
939
 
940
#ifdef CONFIGURE_GNAT_RTEMS
941
#define CONFIGURE_GNAT_MUTEXES 10
942
#define CONFIGURE_GNAT_KEYS    1
943
 
944
/* 20 are required to run all tests in the ACVC */
945
#ifndef CONFIGURE_MAXIMUM_ADA_TASKS
946
#define CONFIGURE_MAXIMUM_ADA_TASKS  20
947
#endif
948
 
949
/* This is the number of non-Ada tasks which invoked Ada code. */
950
#ifndef CONFIGURE_MAXIMUM_FAKE_ADA_TASKS
951
#define CONFIGURE_MAXIMUM_FAKE_ADA_TASKS 0
952
#endif
953
 
954
/* Ada tasks are allocated twice the minimum stack space */
955
#define CONFIGURE_ADA_TASKS_STACK \
956
  (CONFIGURE_MAXIMUM_ADA_TASKS * (RTEMS_MINIMUM_STACK_SIZE + (6 * 1024)))
957
 
958
#else
959
#define CONFIGURE_GNAT_MUTEXES           0
960
#define CONFIGURE_GNAT_KEYS              0
961
#define CONFIGURE_MAXIMUM_ADA_TASKS      0
962
#define CONFIGURE_MAXIMUM_FAKE_ADA_TASKS 0
963
#define CONFIGURE_ADA_TASKS_STACK        0
964
#endif
965
 
966
 
967
#ifdef CONFIGURE_INIT
968
 
969
rtems_api_configuration_table Configuration_RTEMS_API = {
970
  CONFIGURE_MAXIMUM_TASKS,
971
  CONFIGURE_MAXIMUM_TIMERS,
972
  CONFIGURE_MAXIMUM_SEMAPHORES + CONFIGURE_LIBIO_SEMAPHORES +
973
    CONFIGURE_TERMIOS_SEMAPHORES,
974
  CONFIGURE_MAXIMUM_MESSAGE_QUEUES,
975
  CONFIGURE_MAXIMUM_PARTITIONS,
976
  CONFIGURE_MAXIMUM_REGIONS + CONFIGURE_MALLOC_REGION,
977
  CONFIGURE_MAXIMUM_PORTS,
978
  CONFIGURE_MAXIMUM_PERIODS,
979
  CONFIGURE_INIT_TASK_TABLE_SIZE,
980
  CONFIGURE_INIT_TASK_TABLE
981
};
982
 
983
#ifdef RTEMS_POSIX_API
984
posix_api_configuration_table Configuration_POSIX_API = {
985
  CONFIGURE_MAXIMUM_POSIX_THREADS + CONFIGURE_MAXIMUM_ADA_TASKS,
986
  CONFIGURE_MAXIMUM_POSIX_MUTEXES + CONFIGURE_GNAT_MUTEXES +
987
    CONFIGURE_MAXIMUM_ADA_TASKS + CONFIGURE_MAXIMUM_FAKE_ADA_TASKS,
988
  CONFIGURE_MAXIMUM_POSIX_CONDITION_VARIABLES +
989
    CONFIGURE_MAXIMUM_ADA_TASKS + CONFIGURE_MAXIMUM_FAKE_ADA_TASKS,
990
  CONFIGURE_MAXIMUM_POSIX_KEYS + CONFIGURE_GNAT_KEYS,
991
  CONFIGURE_MAXIMUM_POSIX_TIMERS,
992
  CONFIGURE_MAXIMUM_POSIX_QUEUED_SIGNALS,
993
  CONFIGURE_MAXIMUM_POSIX_MESSAGE_QUEUES,
994
  CONFIGURE_MAXIMUM_POSIX_SEMAPHORES,
995
  CONFIGURE_POSIX_INIT_THREAD_TABLE_SIZE,
996
  CONFIGURE_POSIX_INIT_THREAD_TABLE_NAME
997
};
998
#endif
999
 
1000
#ifdef RTEMS_ITRON_API
1001
itron_api_configuration_table Configuration_ITRON_API = {
1002
  CONFIGURE_MAXIMUM_ITRON_TASKS,
1003
  CONFIGURE_MAXIMUM_ITRON_SEMAPHORES,
1004
  CONFIGURE_MAXIMUM_ITRON_EVENTFLAGS,
1005
  CONFIGURE_MAXIMUM_ITRON_MAILBOXES,
1006
  CONFIGURE_MAXIMUM_ITRON_MESSAGE_BUFFERS,
1007
  CONFIGURE_MAXIMUM_ITRON_PORTS,
1008
  CONFIGURE_MAXIMUM_ITRON_MEMORY_POOLS,
1009
  CONFIGURE_MAXIMUM_ITRON_FIXED_MEMORY_POOLS,
1010
  CONFIGURE_ITRON_INIT_TASK_TABLE_SIZE,
1011
  CONFIGURE_ITRON_INIT_TASK_TABLE_NAME
1012
};
1013
#endif
1014
 
1015
rtems_configuration_table Configuration = {
1016
  CONFIGURE_EXECUTIVE_RAM_WORK_AREA,
1017
  CONFIGURE_EXECUTIVE_RAM_SIZE,
1018
  CONFIGURE_MAXIMUM_USER_EXTENSIONS + CONFIGURE_NEWLIB_EXTENSION +
1019
      CONFIGURE_STACK_CHECKER_EXTENSION,
1020
  CONFIGURE_MICROSECONDS_PER_TICK,
1021
  CONFIGURE_TICKS_PER_TIMESLICE,
1022
  CONFIGURE_MAXIMUM_DEVICES,
1023
  CONFIGURE_MAXIMUM_DRIVERS,
1024
  CONFIGURE_NUMBER_OF_DRIVERS,               /* number of device drivers */
1025
  Device_drivers,                            /* pointer to driver table */
1026
  CONFIGURE_NUMBER_OF_INITIAL_EXTENSIONS,    /* number of initial extensions */
1027
  CONFIGURE_INITIAL_EXTENSION_TABLE,         /* pointer to initial extensions */
1028
  CONFIGURE_MULTIPROCESSING_TABLE,           /* pointer to MP config table */
1029
  &Configuration_RTEMS_API,                  /* pointer to RTEMS API config */
1030
#ifdef RTEMS_POSIX_API
1031
  &Configuration_POSIX_API,                  /* pointer to POSIX API config */
1032
#else
1033
  NULL,                                      /* pointer to POSIX API config */
1034
#endif
1035
#ifdef RTEMS_ITRON_API
1036
  &Configuration_ITRON_API                   /* pointer to ITRON API config */
1037
#else
1038
  NULL                                       /* pointer to ITRON API config */
1039
#endif
1040
};
1041
#endif
1042
 
1043
#endif /* CONFIGURE_HAS_OWN_CONFIGURATION_TABLE */
1044
 
1045
#ifdef __cplusplus
1046
}
1047
#endif
1048
 
1049
/*
1050
 *  Some warnings and error checking
1051
 */
1052
 
1053
/*
1054
 *  Make sure a task/thread of some sort is configured
1055
 */
1056
 
1057
#if (CONFIGURE_MAXIMUM_TASKS == 0) && \
1058
    (CONFIGURE_MAXIMUM_POSIX_THREADS == 0) && \
1059
    (CONFIGURE_MAXIMUM_ADA_TASKS == 0) &&  \
1060
    (CONFIGURE_MAXIMUM_ITRON_TASKS == 0)
1061
#error "CONFIGURATION ERROR: No tasks or threads configured!!"
1062
#endif
1063
 
1064
/*
1065
 *  Make sure at least one of the initialization task/thread
1066
 *  tables was defined.
1067
 */
1068
 
1069
#if !defined(CONFIGURE_RTEMS_INIT_TASKS_TABLE) && \
1070
    !defined(CONFIGURE_POSIX_INIT_THREAD_TABLE) && \
1071
    !defined(CONFIGURE_ITRON_INIT_TASK_TABLE)
1072
#error "CONFIGURATION ERROR: No initialization tasks or threads configured!!"
1073
#endif
1074
 
1075
#endif
1076
/* end of include file */

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.