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

Subversion Repositories or1k

[/] [or1k/] [trunk/] [rtems-20020807/] [cpukit/] [sapi/] [src/] [itronapi.c] - Blame information for rev 1780

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

Line No. Rev Author Line
1 1026 ivang
/*
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.OARcorp.com/rtems/license.html.
12
 *
13
 *  itronapi.c,v 1.3 2002/07/01 22:31:29 joel Exp
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
 
50
itron_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
 
63
Objects_Information *_ITRON_Objects[ OBJECTS_ITRON_CLASSES_LAST + 1 ];
64
 
65
void _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 */

powered by: WebSVN 2.1.0

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