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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [rtos/] [rtems/] [c/] [src/] [exec/] [sapi/] [src/] [itronapi.c] - Blame information for rev 173

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 30 unneback
/*
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
 *  $Id: itronapi.c,v 1.2 2001-09-27 11:59:20 chris 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
 
64
void _ITRON_API_Initialize(
65
  rtems_configuration_table *configuration_table
66
)
67
{
68
  itron_api_configuration_table *api_configuration;
69
 
70
  /* XXX need to assert here based on size assumptions */
71
 
72
  assert( sizeof(ID) == sizeof(Objects_Id) );
73
 
74
  api_configuration = configuration_table->ITRON_api_configuration;
75
  if ( !api_configuration )
76
    api_configuration = &_ITRON_Default_configuration;
77
 
78
  _ITRON_Task_Manager_initialization(
79
    api_configuration->maximum_tasks,
80
    api_configuration->number_of_initialization_tasks,
81
    api_configuration->User_initialization_tasks_table
82
  );
83
 
84
  _ITRON_Semaphore_Manager_initialization(
85
    api_configuration->maximum_semaphores
86
  );
87
 
88
  _ITRON_Eventflags_Manager_initialization(
89
    api_configuration->maximum_eventflags
90
  );
91
 
92
  _ITRON_Fixed_memory_pool_Manager_initialization(
93
    api_configuration->maximum_fixed_memory_pools
94
  );
95
 
96
  _ITRON_Mailbox_Manager_initialization(
97
    api_configuration->maximum_mailboxes
98
  );
99
 
100
  _ITRON_Message_buffer_Manager_initialization(
101
    api_configuration->maximum_message_buffers
102
  );
103
 
104
  _ITRON_Port_Manager_initialization(
105
    api_configuration->maximum_ports
106
  );
107
 
108
  _ITRON_Variable_memory_pool_Manager_initialization(
109
    api_configuration->maximum_memory_pools
110
  );
111
 
112
 
113
}
114
 
115
#endif
116
/* end of file */

powered by: WebSVN 2.1.0

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