source: rtems/cpukit/sapi/src/itronapi.c @ 8bd41178

4.104.114.84.95
Last change on this file since 8bd41178 was 2ba508b, checked in by Joel Sherrill <joel.sherrill@…>, on 09/04/03 at 18:54:35

2003-09-04 Joel Sherrill <joel@…>

  • include/confdefs.h, include/rtems/config.h, include/rtems/extension.h, include/rtems/fatal.h, include/rtems/init.h, include/rtems/io.h, include/rtems/mptables.h, include/rtems/sptables.h, include/rtems/sptables.h.in, inline/rtems/extension.inl, macros/rtems/extension.inl, src/debug.c, src/exinit.c, src/extension.c, src/extensioncreate.c, src/extensiondelete.c, src/extensionident.c, src/fatal.c, src/io.c, src/itronapi.c, src/posixapi.c, src/rtemsapi.c: URL for license changed.
  • Property mode set to 100644
File size: 3.0 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#include <assert.h>
17
18/*
19 *  ITRON_API_INIT is defined so all of the ITRON API
20 *  data will be included in this object file.
21 */
22
23#define ITRON_API_INIT
24
25#include <rtems/system.h>    /* include this before checking RTEMS_ITRON_API */
26#ifdef RTEMS_ITRON_API
27
28#include <itron.h>
29
30#include <sys/types.h>
31#include <rtems/config.h>
32#include <rtems/score/object.h>
33
34#include <rtems/itron/eventflags.h>
35#include <rtems/itron/fmempool.h>
36#include <rtems/itron/mbox.h>
37#include <rtems/itron/msgbuffer.h>
38#include <rtems/itron/port.h>
39#include <rtems/itron/semaphore.h>
40#include <rtems/itron/task.h>
41#include <rtems/itron/vmempool.h>
42
43/*PAGE
44 *
45 *  _ITRON_API_Initialize
46 *
47 *  XXX
48 */
49
50itron_api_configuration_table _ITRON_Default_configuration = {
51  0,                             /* maximum_tasks */
52  0,                             /* maximum_semaphores */
53  0,                             /* maximum_eventflags */
54  0,                             /* maximum_mailboxes */
55  0,                             /* maximum_message_buffers */
56  0,                             /* maximum_ports */
57  0,                             /* maximum_memory_pools */
58  0,                             /* maximum_fixed_memory_pools */
59  0,                             /* number_of_initialization_tasks */
60  NULL                           /* User_initialization_tasks_table */
61};
62
63Objects_Information *_ITRON_Objects[ OBJECTS_ITRON_CLASSES_LAST + 1 ];
64
65void _ITRON_API_Initialize(
66  rtems_configuration_table *configuration_table
67)
68{
69  itron_api_configuration_table *api_configuration;
70
71  /* XXX need to assert here based on size assumptions */
72
73  assert( sizeof(ID) == sizeof(Objects_Id) );
74
75  api_configuration = configuration_table->ITRON_api_configuration;
76  if ( !api_configuration )
77    api_configuration = &_ITRON_Default_configuration;
78
79  _Objects_Information_table[OBJECTS_ITRON_API] = _ITRON_Objects;
80   
81  _ITRON_Task_Manager_initialization(
82    api_configuration->maximum_tasks,
83    api_configuration->number_of_initialization_tasks,
84    api_configuration->User_initialization_tasks_table
85  );
86 
87  _ITRON_Semaphore_Manager_initialization(
88    api_configuration->maximum_semaphores
89  );
90
91  _ITRON_Eventflags_Manager_initialization(
92    api_configuration->maximum_eventflags
93  );
94
95  _ITRON_Fixed_memory_pool_Manager_initialization(
96    api_configuration->maximum_fixed_memory_pools
97  );
98
99  _ITRON_Mailbox_Manager_initialization(
100    api_configuration->maximum_mailboxes
101  );
102
103  _ITRON_Message_buffer_Manager_initialization(
104    api_configuration->maximum_message_buffers
105  );
106
107  _ITRON_Port_Manager_initialization(
108    api_configuration->maximum_ports
109  );
110
111  _ITRON_Variable_memory_pool_Manager_initialization(
112    api_configuration->maximum_memory_pools
113  );
114
115
116}
117
118#endif
119/* end of file */
Note: See TracBrowser for help on using the repository browser.