source: rtems/cpukit/sapi/src/itronapi.c @ f26145b

4.104.114.84.95
Last change on this file since f26145b was 16351f7a, checked in by Ralf Corsepius <ralf.corsepius@…>, on Jan 28, 2005 at 2:04:21 AM

2005-01-28 Ralf Corsepius <ralf.corsepius@…>

  • sapi/src/debug.c, sapi/src/exinit.c, sapi/src/extension.c, sapi/src/extensioncreate.c, sapi/src/extensiondelete.c, sapi/src/extensionident.c, sapi/src/fatal.c, sapi/src/io.c, sapi/src/itronapi.c, sapi/src/posixapi.c, sapi/src/rtemsapi.c: Include config.h.
  • Property mode set to 100644
File size: 3.1 KB
Line 
1/*
2 *  ITRON API Initialization Support
3 *
4 *  NOTE:
5 *
6 *  COPYRIGHT (c) 1989-1999.
7 *  On-Line Applications Research Corporation (OAR).
8 *
9 *  The license and distribution terms for this file may be
10 *  found in the file LICENSE in this distribution or at
11 *  http://www.rtems.com/license/LICENSE.
12 *
13 *  $Id$
14 */
15
16#if HAVE_CONFIG_H
17#include "config.h"
18#endif
19
20#include <assert.h>
21
22/*
23 *  ITRON_API_INIT is defined so all of the ITRON API
24 *  data will be included in this object file.
25 */
26
27#define ITRON_API_INIT
28
29#include <rtems/system.h>    /* include this before checking RTEMS_ITRON_API */
30#ifdef RTEMS_ITRON_API
31
32#include <rtems/itron.h>
33
34#include <sys/types.h>
35#include <rtems/config.h>
36#include <rtems/score/object.h>
37
38#include <rtems/itron/eventflags.h>
39#include <rtems/itron/fmempool.h>
40#include <rtems/itron/mbox.h>
41#include <rtems/itron/msgbuffer.h>
42#include <rtems/itron/port.h>
43#include <rtems/itron/semaphore.h>
44#include <rtems/itron/task.h>
45#include <rtems/itron/vmempool.h>
46
47/*PAGE
48 *
49 *  _ITRON_API_Initialize
50 *
51 *  XXX
52 */
53
54itron_api_configuration_table _ITRON_Default_configuration = {
55  0,                             /* maximum_tasks */
56  0,                             /* maximum_semaphores */
57  0,                             /* maximum_eventflags */
58  0,                             /* maximum_mailboxes */
59  0,                             /* maximum_message_buffers */
60  0,                             /* maximum_ports */
61  0,                             /* maximum_memory_pools */
62  0,                             /* maximum_fixed_memory_pools */
63  0,                             /* number_of_initialization_tasks */
64  NULL                           /* User_initialization_tasks_table */
65};
66
67Objects_Information *_ITRON_Objects[ OBJECTS_ITRON_CLASSES_LAST + 1 ];
68
69void _ITRON_API_Initialize(
70  rtems_configuration_table *configuration_table
71)
72{
73  itron_api_configuration_table *api_configuration;
74
75  /* XXX need to assert here based on size assumptions */
76
77  assert( sizeof(ID) == sizeof(Objects_Id) );
78
79  api_configuration = configuration_table->ITRON_api_configuration;
80  if ( !api_configuration )
81    api_configuration = &_ITRON_Default_configuration;
82
83  _Objects_Information_table[OBJECTS_ITRON_API] = _ITRON_Objects;
84
85  _ITRON_Task_Manager_initialization(
86    api_configuration->maximum_tasks,
87    api_configuration->number_of_initialization_tasks,
88    api_configuration->User_initialization_tasks_table
89  );
90
91  _ITRON_Semaphore_Manager_initialization(
92    api_configuration->maximum_semaphores
93  );
94
95  _ITRON_Eventflags_Manager_initialization(
96    api_configuration->maximum_eventflags
97  );
98
99  _ITRON_Fixed_memory_pool_Manager_initialization(
100    api_configuration->maximum_fixed_memory_pools
101  );
102
103  _ITRON_Mailbox_Manager_initialization(
104    api_configuration->maximum_mailboxes
105  );
106
107  _ITRON_Message_buffer_Manager_initialization(
108    api_configuration->maximum_message_buffers
109  );
110
111  _ITRON_Port_Manager_initialization(
112    api_configuration->maximum_ports
113  );
114
115  _ITRON_Variable_memory_pool_Manager_initialization(
116    api_configuration->maximum_memory_pools
117  );
118
119
120}
121
122#endif
123/* end of file */
Note: See TracBrowser for help on using the repository browser.