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 __RTEMS_MPCI_h |
---|
18 | #define __RTEMS_MPCI_h |
---|
19 | |
---|
20 | #ifdef __cplusplus |
---|
21 | extern "C" { |
---|
22 | #endif |
---|
23 | |
---|
24 | #include <rtems/mppkt.h> |
---|
25 | #include <rtems/states.h> |
---|
26 | #include <rtems/status.h> |
---|
27 | #include <rtems/thread.h> |
---|
28 | #include <rtems/threadq.h> |
---|
29 | #include <rtems/tqdata.h> |
---|
30 | #include <rtems/watchdog.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 | * _MPCI_Handler_initialization |
---|
49 | * |
---|
50 | * DESCRIPTION: |
---|
51 | * |
---|
52 | * This routine performs the initialization necessary for this handler. |
---|
53 | */ |
---|
54 | |
---|
55 | void _MPCI_Handler_initialization ( void ); |
---|
56 | |
---|
57 | /* |
---|
58 | * _MPCI_Initialization |
---|
59 | * |
---|
60 | * DESCRIPTION: |
---|
61 | * |
---|
62 | * This routine initializes the MPCI driver by |
---|
63 | * invoking the user provided MPCI initialization callout. |
---|
64 | */ |
---|
65 | |
---|
66 | void _MPCI_Initialization ( void ); |
---|
67 | |
---|
68 | /* |
---|
69 | * _MPCI_Get_packet |
---|
70 | * |
---|
71 | * DESCRIPTION: |
---|
72 | * |
---|
73 | * This function obtains a packet by invoking the user provided |
---|
74 | * MPCI get packet callout. |
---|
75 | */ |
---|
76 | |
---|
77 | rtems_packet_prefix *_MPCI_Get_packet ( void ); |
---|
78 | |
---|
79 | /* |
---|
80 | * _MPCI_Return_packet |
---|
81 | * |
---|
82 | * DESCRIPTION: |
---|
83 | * |
---|
84 | * This routine returns a packet by invoking the user provided |
---|
85 | * MPCI return packet callout. |
---|
86 | */ |
---|
87 | |
---|
88 | void _MPCI_Return_packet ( |
---|
89 | rtems_packet_prefix *the_packet |
---|
90 | ); |
---|
91 | |
---|
92 | /* |
---|
93 | * _MPCI_Send_process_packet |
---|
94 | * |
---|
95 | * DESCRIPTION: |
---|
96 | * |
---|
97 | * This routine sends a process packet by invoking the user provided |
---|
98 | * MPCI send callout. |
---|
99 | */ |
---|
100 | |
---|
101 | void _MPCI_Send_process_packet ( |
---|
102 | unsigned32 destination, |
---|
103 | rtems_packet_prefix *the_packet |
---|
104 | ); |
---|
105 | |
---|
106 | /* |
---|
107 | * _MPCI_Send_request_packet |
---|
108 | * |
---|
109 | * DESCRIPTION: |
---|
110 | * |
---|
111 | * This routine sends a request packet by invoking the user provided |
---|
112 | * MPCI send callout. |
---|
113 | */ |
---|
114 | |
---|
115 | rtems_status_code _MPCI_Send_request_packet ( |
---|
116 | unsigned32 destination, |
---|
117 | rtems_packet_prefix *the_packet, |
---|
118 | States_Control extra_state |
---|
119 | ); |
---|
120 | |
---|
121 | /* |
---|
122 | * _MPCI_Send_response_packet |
---|
123 | * |
---|
124 | * DESCRIPTION: |
---|
125 | * |
---|
126 | * This routine sends a response packet by invoking the user provided |
---|
127 | * MPCI send callout. |
---|
128 | */ |
---|
129 | |
---|
130 | void _MPCI_Send_response_packet ( |
---|
131 | unsigned32 destination, |
---|
132 | rtems_packet_prefix *the_packet |
---|
133 | ); |
---|
134 | |
---|
135 | /* |
---|
136 | * _MPCI_Receive_packet |
---|
137 | * |
---|
138 | * DESCRIPTION: |
---|
139 | * |
---|
140 | * This routine receives a packet by invoking the user provided |
---|
141 | * MPCI receive callout. |
---|
142 | */ |
---|
143 | |
---|
144 | rtems_packet_prefix *_MPCI_Receive_packet ( void ); |
---|
145 | |
---|
146 | /* |
---|
147 | * _MPCI_Process_response |
---|
148 | * |
---|
149 | * DESCRIPTION: |
---|
150 | * |
---|
151 | * This routine obtains a packet by invoking the user provided |
---|
152 | * MPCI get packet callout. |
---|
153 | */ |
---|
154 | |
---|
155 | Thread_Control *_MPCI_Process_response ( |
---|
156 | rtems_packet_prefix *the_packet |
---|
157 | ); |
---|
158 | |
---|
159 | /* |
---|
160 | * The following thread queue is used to maintain a list of tasks |
---|
161 | * which currently have outstanding remote requests. |
---|
162 | */ |
---|
163 | |
---|
164 | EXTERN Thread_queue_Control _MPCI_Remote_blocked_threads; |
---|
165 | |
---|
166 | #ifdef __cplusplus |
---|
167 | } |
---|
168 | #endif |
---|
169 | |
---|
170 | #endif |
---|
171 | /* end of include file */ |
---|