source: rtems/cpukit/score/include/rtems/score/mpci.h @ dd687d97

4.104.114.84.95
Last change on this file since dd687d97 was dd687d97, checked in by Joel Sherrill <joel.sherrill@…>, on 09/04/03 at 18:56:05

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

  • include/rtems/debug.h, include/rtems/seterr.h, include/rtems/system.h, include/rtems/score/address.h, include/rtems/score/apiext.h, include/rtems/score/apimutex.h, include/rtems/score/bitfield.h, include/rtems/score/chain.h, include/rtems/score/context.h, include/rtems/score/copyrt.h, include/rtems/score/coremsg.h, include/rtems/score/coremutex.h, include/rtems/score/coresem.h, include/rtems/score/heap.h, include/rtems/score/interr.h, include/rtems/score/isr.h, include/rtems/score/mpci.h, include/rtems/score/mppkt.h, include/rtems/score/object.h, include/rtems/score/objectmp.h, include/rtems/score/priority.h, include/rtems/score/stack.h, include/rtems/score/states.h, include/rtems/score/sysstate.h, include/rtems/score/thread.h, include/rtems/score/threadmp.h, include/rtems/score/threadq.h, include/rtems/score/tod.h, include/rtems/score/tqdata.h, include/rtems/score/userext.h, include/rtems/score/watchdog.h, include/rtems/score/wkspace.h, inline/rtems/score/address.inl, inline/rtems/score/chain.inl, inline/rtems/score/coremsg.inl, inline/rtems/score/coremutex.inl, inline/rtems/score/coresem.inl, inline/rtems/score/heap.inl, inline/rtems/score/isr.inl, inline/rtems/score/mppkt.inl, inline/rtems/score/object.inl, inline/rtems/score/objectmp.inl, inline/rtems/score/priority.inl, inline/rtems/score/stack.inl, inline/rtems/score/states.inl, inline/rtems/score/sysstate.inl, inline/rtems/score/thread.inl, inline/rtems/score/threadmp.inl, inline/rtems/score/tod.inl, inline/rtems/score/tqdata.inl, inline/rtems/score/userext.inl, inline/rtems/score/watchdog.inl, inline/rtems/score/wkspace.inl, macros/rtems/score/address.inl, macros/rtems/score/chain.inl, macros/rtems/score/coremsg.inl, macros/rtems/score/coremutex.inl, macros/rtems/score/coresem.inl, macros/rtems/score/heap.inl, macros/rtems/score/isr.inl, macros/rtems/score/mppkt.inl, macros/rtems/score/object.inl, macros/rtems/score/objectmp.inl, macros/rtems/score/priority.inl, macros/rtems/score/stack.inl, macros/rtems/score/states.inl, macros/rtems/score/sysstate.inl, macros/rtems/score/thread.inl, macros/rtems/score/threadmp.inl, macros/rtems/score/tod.inl, macros/rtems/score/tqdata.inl, macros/rtems/score/userext.inl, macros/rtems/score/watchdog.inl, macros/rtems/score/wkspace.inl, src/apiext.c, src/chain.c, src/coremsg.c, src/coremsgbroadcast.c, src/coremsgclose.c, src/coremsgflush.c, src/coremsgflushsupp.c, src/coremsgflushwait.c, src/coremsginsert.c, src/coremsgseize.c, src/coremsgsubmit.c, src/coremutex.c, src/coremutexflush.c, src/coremutexseize.c, src/coremutexsurrender.c, src/coresem.c, src/coresemflush.c, src/coresemseize.c, src/coresemsurrender.c, src/coretod.c, src/coretodset.c, src/coretodtickle.c, src/coretodtoseconds.c, src/coretodvalidate.c, src/heap.c, src/heapallocate.c, src/heapextend.c, src/heapfree.c, src/heapgetinfo.c, src/heapsizeofuserarea.c, src/heapwalk.c, src/interr.c, src/isr.c, src/iterateoverthreads.c, src/mpci.c, src/object.c, src/objectallocate.c, src/objectallocatebyindex.c, src/objectclearname.c, src/objectcomparenameraw.c, src/objectcomparenamestring.c, src/objectcopynameraw.c, src/objectcopynamestring.c, src/objectextendinformation.c, src/objectfree.c, src/objectget.c, src/objectgetbyindex.c, src/objectgetisr.c, src/objectgetnext.c, src/objectgetnoprotection.c, src/objectidtoname.c, src/objectinitializeinformation.c, src/objectmp.c, src/objectnametoid.c, src/objectshrinkinformation.c, src/thread.c, src/threadchangepriority.c, src/threadclearstate.c, src/threadclose.c, src/threadcreateidle.c, src/threaddelayended.c, src/threaddispatch.c, src/threadevaluatemode.c, src/threadget.c, src/threadhandler.c, src/threadidlebody.c, src/threadinitialize.c, src/threadloadenv.c, src/threadmp.c, src/threadq.c, src/threadqdequeue.c, src/threadqdequeuefifo.c, src/threadqdequeuepriority.c, src/threadqenqueue.c, src/threadqenqueuefifo.c, src/threadqenqueuepriority.c, src/threadqextract.c, src/threadqextractfifo.c, src/threadqextractpriority.c, src/threadqextractwithproxy.c, src/threadqfirst.c, src/threadqfirstfifo.c, src/threadqfirstpriority.c, src/threadqflush.c, src/threadqtimeout.c, src/threadready.c, src/threadreset.c, src/threadresettimeslice.c, src/threadrestart.c, src/threadresume.c, src/threadrotatequeue.c, src/threadsetpriority.c, src/threadsetstate.c, src/threadsettransient.c, src/threadstackallocate.c, src/threadstackfree.c, src/threadstart.c, src/threadstartmultitasking.c, src/threadsuspend.c, src/threadtickletimeslice.c, src/threadyieldprocessor.c, src/userext.c, src/watchdog.c, src/watchdogadjust.c, src/watchdoginsert.c, src/watchdogremove.c, src/watchdogtickle.c, src/wkspace.c: URL for license changed.
  • Property mode set to 100644
File size: 8.8 KB
RevLine 
[ac7d5ef0]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 *
[08311cc3]6 *  COPYRIGHT (c) 1989-1999.
[ac7d5ef0]7 *  On-Line Applications Research Corporation (OAR).
8 *
[98e4ebf5]9 *  The license and distribution terms for this file may be
10 *  found in the file LICENSE in this distribution or at
[dd687d97]11 *  http://www.rtems.com/license/LICENSE.
[ac7d5ef0]12 *
13 *  $Id$
14 */
15
[3a4ae6c]16#ifndef __MPCI_h
17#define __MPCI_h
[ac7d5ef0]18
19#ifdef __cplusplus
20extern "C" {
21#endif
22
[5e9b32b]23#include <rtems/score/mppkt.h>
24#include <rtems/score/states.h>
25#include <rtems/score/thread.h>
26#include <rtems/score/threadq.h>
27#include <rtems/score/tqdata.h>
28#include <rtems/score/watchdog.h>
29#include <rtems/score/coresem.h>
[ac7d5ef0]30
[adf98bd]31/*
32 *  The following constants define the stack size requirements for
33 *  the system threads.
34 */
35 
36#define MPCI_RECEIVE_SERVER_STACK_SIZE \
37  ( STACK_MINIMUM_SIZE + \
38    CPU_MPCI_RECEIVE_SERVER_EXTRA_STACK + \
39    _CPU_Table.extra_mpci_receive_server_stack \
40  )
41
[ac7d5ef0]42/*
43 *  The following defines the node number used when a broadcast is desired.
44 */
45
46#define MPCI_ALL_NODES 0
47
48/*
49 *  For packets associated with requests that don't already have a timeout,
50 *  use the one specified by this MPCI driver.  The value specified by
51 *   the MPCI driver sets an upper limit on how long a remote request
52 *   should take to complete.
53 */
54
55#define MPCI_DEFAULT_TIMEOUT    0xFFFFFFFF
56
[3a4ae6c]57/*
58 *  The following records define the Multiprocessor Communications
59 *  Interface (MPCI) Table.  This table defines the user-provided
60 *  MPCI which is a required part of a multiprocessor system.
61 *
62 *  For non-blocking local operations that become remote operations,
63 *  we need a timeout.  This is a per-driver timeout: default_timeout
64 */
65
66typedef void MPCI_Entry;
67
68typedef MPCI_Entry ( *MPCI_initialization_entry )( void );
69
70typedef MPCI_Entry ( *MPCI_get_packet_entry )(
71                 MP_packet_Prefix **
72             );
73
74typedef MPCI_Entry ( *MPCI_return_packet_entry )(
75                 MP_packet_Prefix *
76             );
77
78typedef MPCI_Entry ( *MPCI_send_entry )(
79                 unsigned32,
80                 MP_packet_Prefix *
81             );
82
83typedef MPCI_Entry ( *MPCI_receive_entry )(
84                 MP_packet_Prefix **
85             );
86
87typedef struct {
88  unsigned32                 default_timeout;        /* in ticks */
89  unsigned32                 maximum_packet_size;
90  MPCI_initialization_entry  initialization;
91  MPCI_get_packet_entry      get_packet;
92  MPCI_return_packet_entry   return_packet;
93  MPCI_send_entry            send_packet;
94  MPCI_receive_entry         receive_packet;
95} MPCI_Control;
96
97/*
98 *  The following defines the type for packet processing routines
99 *  invoked by the MPCI Receive server.
100 */
101
102typedef void (*MPCI_Packet_processor)( MP_packet_Prefix * );
103 
[adf98bd]104/*
105 *  The following enumerated type defines the list of
106 *  internal MP operations.
107 */
108 
109typedef enum {
110  MPCI_PACKETS_SYSTEM_VERIFY  =  0
111}   MPCI_Internal_Remote_operations;
112 
113/*
114 *  The following data structure defines the packet used to perform
115 *  remote event operations.
116 */
117 
118typedef struct {
119  MP_packet_Prefix                 Prefix;
120  MPCI_Internal_Remote_operations  operation;
121  unsigned32                       maximum_nodes;
122  unsigned32                       maximum_global_objects;
123}    MPCI_Internal_packet;
124
[3a4ae6c]125/*
126 *  This is the core semaphore which the MPCI Receive Server blocks on.
127 */
128
[c627b2a3]129SCORE_EXTERN CORE_semaphore_Control _MPCI_Semaphore;
[3a4ae6c]130/*
131 *  The following thread queue is used to maintain a list of tasks
132 *  which currently have outstanding remote requests.
133 */
134
[c627b2a3]135SCORE_EXTERN Thread_queue_Control _MPCI_Remote_blocked_threads;
[3a4ae6c]136
137/*
138 *  The following define the internal pointers to the user's
139 *  configuration information.
140 */
141 
[c627b2a3]142SCORE_EXTERN MPCI_Control *_MPCI_table;
[3a4ae6c]143
144/*
145 *  The following points to the MPCI Receive Server.
146 */
147 
[c627b2a3]148SCORE_EXTERN Thread_Control *_MPCI_Receive_server_tcb;
[3a4ae6c]149
150/*
151 *  The following table contains the process packet routines provided
152 *  by each object that supports MP operations.
153 */
154
[c627b2a3]155SCORE_EXTERN MPCI_Packet_processor
156               _MPCI_Packet_processors[MP_PACKET_CLASSES_LAST+1];
[3a4ae6c]157
[ac7d5ef0]158/*
159 *  _MPCI_Handler_initialization
160 *
161 *  DESCRIPTION:
162 *
163 *  This routine performs the initialization necessary for this handler.
164 */
165
[3a4ae6c]166void _MPCI_Handler_initialization(
[cda7ecc]167  MPCI_Control            *users_mpci_table,
168  unsigned32               timeout_status
[3a4ae6c]169);
[ac7d5ef0]170
[adf98bd]171/*
172 *  _MPCI_Create_server
173 *
174 *  DESCRIPTION:
175 * 
176 *  This routine creates the packet receive server used in MP systems.
177 */
178
179void _MPCI_Create_server( void );
180
[ac7d5ef0]181/*
182 *  _MPCI_Initialization
183 *
184 *  DESCRIPTION:
185 *
186 *  This routine initializes the MPCI driver by
187 *  invoking the user provided MPCI initialization callout.
188 */
189
190void _MPCI_Initialization ( void );
191
[3a4ae6c]192/*
193 *  _MPCI_Register_packet_processor
194 *
195 *  DESCRIPTION:
196 *
197 *  This routine registers the MPCI packet processor for the
198 *  designated object class.
199 */
200 
201void _MPCI_Register_packet_processor(
[6b722e2]202  MP_packet_Classes      the_class,
[3a4ae6c]203  MPCI_Packet_processor  the_packet_processor
204 
205);
206 
[ac7d5ef0]207/*
208 *  _MPCI_Get_packet
209 *
210 *  DESCRIPTION:
211 *
212 *  This function obtains a packet by invoking the user provided
213 *  MPCI get packet callout.
214 */
215
[3a4ae6c]216MP_packet_Prefix *_MPCI_Get_packet ( void );
[ac7d5ef0]217
218/*
219 *  _MPCI_Return_packet
220 *
221 *  DESCRIPTION:
222 *
223 *  This routine returns a packet by invoking the user provided
224 *  MPCI return packet callout.
225 */
226
227void _MPCI_Return_packet (
[3a4ae6c]228  MP_packet_Prefix *the_packet
[ac7d5ef0]229);
230
231/*
232 *  _MPCI_Send_process_packet
233 *
234 *  DESCRIPTION:
235 *
236 *  This routine sends a process packet by invoking the user provided
237 *  MPCI send callout.
238 */
239
240void _MPCI_Send_process_packet (
241  unsigned32        destination,
[3a4ae6c]242  MP_packet_Prefix *the_packet
[ac7d5ef0]243);
244
245/*
246 *  _MPCI_Send_request_packet
247 *
248 *  DESCRIPTION:
249 *
250 *  This routine sends a request packet by invoking the user provided
251 *  MPCI send callout.
252 */
253
[3a4ae6c]254unsigned32 _MPCI_Send_request_packet (
[ac7d5ef0]255  unsigned32         destination,
[3a4ae6c]256  MP_packet_Prefix  *the_packet,
[ac7d5ef0]257  States_Control     extra_state
258);
259
260/*
261 *  _MPCI_Send_response_packet
262 *
263 *  DESCRIPTION:
264 *
265 *  This routine sends a response packet by invoking the user provided
266 *  MPCI send callout.
267 */
268
269void _MPCI_Send_response_packet (
270  unsigned32        destination,
[3a4ae6c]271  MP_packet_Prefix *the_packet
[ac7d5ef0]272);
273
274/*
275 *  _MPCI_Receive_packet
276 *
277 *  DESCRIPTION:
278 *
279 *  This routine receives a packet by invoking the user provided
280 *  MPCI receive callout.
281 */
282
[3a4ae6c]283MP_packet_Prefix  *_MPCI_Receive_packet ( void );
[ac7d5ef0]284
285/*
286 *  _MPCI_Process_response
287 *
288 *  DESCRIPTION:
289 *
290 *  This routine obtains a packet by invoking the user provided
291 *  MPCI get packet callout.
292 */
293
294Thread_Control *_MPCI_Process_response (
[3a4ae6c]295  MP_packet_Prefix *the_packet
[ac7d5ef0]296);
297
[3a4ae6c]298/*PAGE
299 *
300 *  _MPCI_Receive_server
301 *
[ac7d5ef0]302 */
[3a4ae6c]303 
[adf98bd]304Thread _MPCI_Receive_server(
305  unsigned32 ignored
306);
[ac7d5ef0]307
[3a4ae6c]308/*PAGE
309 *
310 *  _MPCI_Announce
311 *
312 *  DESCRIPTION:
313 *
314 *  XXX
315 */
316 
317void _MPCI_Announce ( void );
[ac7d5ef0]318
[adf98bd]319/*
320 *  _MPCI_Internal_packets_Send_process_packet
321 *
322 *  DESCRIPTION:
323 *
324 *  This routine performs a remote procedure call so that a
325 *  process operation can be performed on another node.
326 */
327 
328void _MPCI_Internal_packets_Send_process_packet (
329   MPCI_Internal_Remote_operations operation
330);
331 
332/*
333 *  _MPCI_Internal_packets_Send_request_packet
334 *
335 *  DESCRIPTION:
336 *
337 *  This routine performs a remote procedure call so that a
338 *  directive operation can be initiated on another node.
339 *
340 *  This routine is not needed since there are no request
341 *  packets to be sent by this manager.
342 */
343 
344/*
345 *  _MPCI_Internal_packets_Send_response_packet
346 *
347 *  DESCRIPTION:
348 *
349 *  This routine performs a remote procedure call so that a
350 *  directive can be performed on another node.
351 *
352 *  This routine is not needed since there are no response
353 *  packets to be sent by this manager.
354 */
355 
356/*
357 *
358 *  _MPCI_Internal_packets_Process_packet
359 *
360 *  DESCRIPTION:
361 *
362 *  This routine performs the actions specific to this package for
363 *  the request from another node.
364 */
365 
366void _MPCI_Internal_packets_Process_packet (
367  MP_packet_Prefix *the_packet_prefix
368);
369 
370/*
371 *  _MPCI_Internal_packets_Send_object_was_deleted
372 *
373 *  DESCRIPTION:
374 *
375 *  This routine is invoked indirectly by the thread queue
376 *  when a proxy has been removed from the thread queue and
377 *  the remote node must be informed of this.
378 *
379 *  This routine is not needed since there are no objects
380 *  deleted by this manager.
381 */
382 
383/*
384 *  _MPCI_Internal_packets_Send_extract_proxy
385 *
386 *  DESCRIPTION:
387 *
388 *  This routine is invoked when a task is deleted and it
389 *  has a proxy which must be removed from a thread queue and
390 *  the remote node must be informed of this.
391 *
392 *  This routine is not needed since there are no objects
393 *  deleted by this manager.
394 */
395 
396/*
397 *  _MPCI_Internal_packets_Get_packet
398 *
399 *  DESCRIPTION:
400 *
401 *  This routine is used to obtain a internal threads mp packet.
402 */
403 
404 MPCI_Internal_packet *_MPCI_Internal_packets_Get_packet ( void );
405
[ac7d5ef0]406#ifdef __cplusplus
407}
408#endif
409
410#endif
411/* end of include file */
Note: See TracBrowser for help on using the repository browser.