source: rtems/c/src/exec/score/headers/mpci.h @ 3a4ae6c

4.104.114.84.95
Last change on this file since 3a4ae6c was 3a4ae6c, checked in by Joel Sherrill <joel.sherrill@…>, on 09/11/95 at 19:35:39

The word "RTEMS" almost completely removed from the core.

Configuration Table Template file added and all tests
modified to use this. All gvar.h and conftbl.h files
removed from test directories.

Configuration parameter maximum_devices added.

Core semaphore and mutex handlers added and RTEMS API Semaphore
Manager updated to reflect this.

Initialization sequence changed to invoke API specific initialization
routines. Initialization tasks table now owned by RTEMS Tasks Manager.

Added user extension for post-switch.

Utilized user extensions to implement API specific functionality
like signal dispatching.

Added extensions to the System Initialization Thread so that an
API can register a function to be invoked while the system
is being initialized. These are largely equivalent to the
pre-driver and post-driver hooks.

Added the Modules file oar-go32_p5, modified oar-go32, and modified
the file make/custom/go32.cfg to look at an environment varable which
determines what CPU model is being used.

All BSPs updated to reflect named devices and clock driver's IOCTL
used by the Shared Memory Driver. Also merged clock isr into
main file and removed ckisr.c where possible.

Updated spsize to reflect new and moved variables.

Makefiles for the executive source and include files updated to show
break down of files into Core, RTEMS API, and Neither.

Header and inline files installed into subdirectory based on whether
logically in the Core or a part of the RTEMS API.

  • Property mode set to 100644
File size: 5.9 KB
Line 
1/*  mpci.h
2 *
3 *  This include file contains all the constants and structures associated
4 *  with the MPCI layer.  It provides mechanisms to utilize packets.
5 *
6 *  COPYRIGHT (c) 1989, 1990, 1991, 1992, 1993, 1994.
7 *  On-Line Applications Research Corporation (OAR).
8 *  All rights assigned to U.S. Government, 1994.
9 *
10 *  This material may be reproduced by or for the U.S. Government pursuant
11 *  to the copyright license under the clause at DFARS 252.227-7013.  This
12 *  notice must appear in all copies of this file and its derivatives.
13 *
14 *  $Id$
15 */
16
17#ifndef __MPCI_h
18#define __MPCI_h
19
20#ifdef __cplusplus
21extern "C" {
22#endif
23
24#include <rtems/core/mppkt.h>
25#include <rtems/core/states.h>
26#include <rtems/core/thread.h>
27#include <rtems/core/threadq.h>
28#include <rtems/core/tqdata.h>
29#include <rtems/core/watchdog.h>
30#include <rtems/core/coresem.h>
31
32/*
33 *  The following defines the node number used when a broadcast is desired.
34 */
35
36#define MPCI_ALL_NODES 0
37
38/*
39 *  For packets associated with requests that don't already have a timeout,
40 *  use the one specified by this MPCI driver.  The value specified by
41 *   the MPCI driver sets an upper limit on how long a remote request
42 *   should take to complete.
43 */
44
45#define MPCI_DEFAULT_TIMEOUT    0xFFFFFFFF
46
47/*
48 *  The following records define the Multiprocessor Communications
49 *  Interface (MPCI) Table.  This table defines the user-provided
50 *  MPCI which is a required part of a multiprocessor system.
51 *
52 *  For non-blocking local operations that become remote operations,
53 *  we need a timeout.  This is a per-driver timeout: default_timeout
54 */
55
56typedef void MPCI_Entry;
57
58typedef MPCI_Entry ( *MPCI_initialization_entry )( void );
59
60typedef MPCI_Entry ( *MPCI_get_packet_entry )(
61                 MP_packet_Prefix **
62             );
63
64typedef MPCI_Entry ( *MPCI_return_packet_entry )(
65                 MP_packet_Prefix *
66             );
67
68typedef MPCI_Entry ( *MPCI_send_entry )(
69                 unsigned32,
70                 MP_packet_Prefix *
71             );
72
73typedef MPCI_Entry ( *MPCI_receive_entry )(
74                 MP_packet_Prefix **
75             );
76
77typedef struct {
78  unsigned32                 default_timeout;        /* in ticks */
79  unsigned32                 maximum_packet_size;
80  MPCI_initialization_entry  initialization;
81  MPCI_get_packet_entry      get_packet;
82  MPCI_return_packet_entry   return_packet;
83  MPCI_send_entry            send_packet;
84  MPCI_receive_entry         receive_packet;
85} MPCI_Control;
86
87/*
88 *  The following defines the type for packet processing routines
89 *  invoked by the MPCI Receive server.
90 */
91
92typedef void (*MPCI_Packet_processor)( MP_packet_Prefix * );
93 
94/*
95 *  This is the core semaphore which the MPCI Receive Server blocks on.
96 */
97
98EXTERN CORE_semaphore_Control _MPCI_Semaphore;
99/*
100 *  The following thread queue is used to maintain a list of tasks
101 *  which currently have outstanding remote requests.
102 */
103
104EXTERN Thread_queue_Control _MPCI_Remote_blocked_threads;
105
106/*
107 *  The following define the internal pointers to the user's
108 *  configuration information.
109 */
110 
111EXTERN MPCI_Control *_MPCI_table;
112
113/*
114 *  The following points to the MPCI Receive Server.
115 */
116 
117EXTERN Thread_Control *_MPCI_Receive_server_tcb;
118
119/*
120 *  The following table contains the process packet routines provided
121 *  by each object that supports MP operations.
122 */
123
124EXTERN MPCI_Packet_processor _MPCI_Packet_processors[MP_PACKET_CLASSES_LAST+1];
125
126/*
127 *  _MPCI_Handler_initialization
128 *
129 *  DESCRIPTION:
130 *
131 *  This routine performs the initialization necessary for this handler.
132 */
133
134void _MPCI_Handler_initialization(
135  MPCI_Control            *users_mpci_table
136);
137
138/*
139 *  _MPCI_Initialization
140 *
141 *  DESCRIPTION:
142 *
143 *  This routine initializes the MPCI driver by
144 *  invoking the user provided MPCI initialization callout.
145 */
146
147void _MPCI_Initialization ( void );
148
149/*
150 *  _MPCI_Register_packet_processor
151 *
152 *  DESCRIPTION:
153 *
154 *  This routine registers the MPCI packet processor for the
155 *  designated object class.
156 */
157 
158void _MPCI_Register_packet_processor(
159  MP_packet_Classes      the_object,
160  MPCI_Packet_processor  the_packet_processor
161 
162);
163 
164/*
165 *  _MPCI_Get_packet
166 *
167 *  DESCRIPTION:
168 *
169 *  This function obtains a packet by invoking the user provided
170 *  MPCI get packet callout.
171 */
172
173MP_packet_Prefix *_MPCI_Get_packet ( void );
174
175/*
176 *  _MPCI_Return_packet
177 *
178 *  DESCRIPTION:
179 *
180 *  This routine returns a packet by invoking the user provided
181 *  MPCI return packet callout.
182 */
183
184void _MPCI_Return_packet (
185  MP_packet_Prefix *the_packet
186);
187
188/*
189 *  _MPCI_Send_process_packet
190 *
191 *  DESCRIPTION:
192 *
193 *  This routine sends a process packet by invoking the user provided
194 *  MPCI send callout.
195 */
196
197void _MPCI_Send_process_packet (
198  unsigned32        destination,
199  MP_packet_Prefix *the_packet
200);
201
202/*
203 *  _MPCI_Send_request_packet
204 *
205 *  DESCRIPTION:
206 *
207 *  This routine sends a request packet by invoking the user provided
208 *  MPCI send callout.
209 */
210
211unsigned32 _MPCI_Send_request_packet (
212  unsigned32         destination,
213  MP_packet_Prefix  *the_packet,
214  States_Control     extra_state
215);
216
217/*
218 *  _MPCI_Send_response_packet
219 *
220 *  DESCRIPTION:
221 *
222 *  This routine sends a response packet by invoking the user provided
223 *  MPCI send callout.
224 */
225
226void _MPCI_Send_response_packet (
227  unsigned32        destination,
228  MP_packet_Prefix *the_packet
229);
230
231/*
232 *  _MPCI_Receive_packet
233 *
234 *  DESCRIPTION:
235 *
236 *  This routine receives a packet by invoking the user provided
237 *  MPCI receive callout.
238 */
239
240MP_packet_Prefix  *_MPCI_Receive_packet ( void );
241
242/*
243 *  _MPCI_Process_response
244 *
245 *  DESCRIPTION:
246 *
247 *  This routine obtains a packet by invoking the user provided
248 *  MPCI get packet callout.
249 */
250
251Thread_Control *_MPCI_Process_response (
252  MP_packet_Prefix *the_packet
253);
254
255/*PAGE
256 *
257 *  _MPCI_Receive_server
258 *
259 */
260 
261void _MPCI_Receive_server( void );
262
263/*PAGE
264 *
265 *  _MPCI_Announce
266 *
267 *  DESCRIPTION:
268 *
269 *  XXX
270 */
271 
272void _MPCI_Announce ( void );
273
274#ifdef __cplusplus
275}
276#endif
277
278#endif
279/* end of include file */
Note: See TracBrowser for help on using the repository browser.