1 | /* msgmp.h |
---|
2 | * |
---|
3 | * This include file contains all the constants and structures associated |
---|
4 | * with the Multiprocessing Support in the Message Manager. |
---|
5 | * |
---|
6 | * COPYRIGHT (c) 1989-1997. |
---|
7 | * On-Line Applications Research Corporation (OAR). |
---|
8 | * Copyright assigned to U.S. Government, 1994. |
---|
9 | * |
---|
10 | * The license and distribution terms for this file may in |
---|
11 | * the file LICENSE in this distribution or at |
---|
12 | * http://www.OARcorp.com/rtems/license.html. |
---|
13 | * |
---|
14 | * $Id$ |
---|
15 | */ |
---|
16 | |
---|
17 | #ifndef __RTEMS_MESSAGE_QUEUE_MP_h |
---|
18 | #define __RTEMS_MESSAGE_QUEUE_MP_h |
---|
19 | |
---|
20 | #ifdef __cplusplus |
---|
21 | extern "C" { |
---|
22 | #endif |
---|
23 | |
---|
24 | #include <rtems/rtems/message.h> |
---|
25 | #include <rtems/score/mppkt.h> |
---|
26 | #include <rtems/score/object.h> |
---|
27 | #include <rtems/rtems/options.h> |
---|
28 | #include <rtems/score/thread.h> |
---|
29 | #include <rtems/score/watchdog.h> |
---|
30 | |
---|
31 | /* |
---|
32 | * The following enumerated type defines the list of |
---|
33 | * remote message queue operations. |
---|
34 | */ |
---|
35 | |
---|
36 | typedef enum { |
---|
37 | MESSAGE_QUEUE_MP_ANNOUNCE_CREATE = 0, |
---|
38 | MESSAGE_QUEUE_MP_ANNOUNCE_DELETE = 1, |
---|
39 | MESSAGE_QUEUE_MP_EXTRACT_PROXY = 2, |
---|
40 | MESSAGE_QUEUE_MP_RECEIVE_REQUEST = 3, |
---|
41 | MESSAGE_QUEUE_MP_RECEIVE_RESPONSE = 4, |
---|
42 | MESSAGE_QUEUE_MP_SEND_REQUEST = 5, |
---|
43 | MESSAGE_QUEUE_MP_SEND_RESPONSE = 6, |
---|
44 | MESSAGE_QUEUE_MP_URGENT_REQUEST = 7, |
---|
45 | MESSAGE_QUEUE_MP_URGENT_RESPONSE = 8, |
---|
46 | MESSAGE_QUEUE_MP_BROADCAST_REQUEST = 9, |
---|
47 | MESSAGE_QUEUE_MP_BROADCAST_RESPONSE = 10, |
---|
48 | MESSAGE_QUEUE_MP_FLUSH_REQUEST = 11, |
---|
49 | MESSAGE_QUEUE_MP_FLUSH_RESPONSE = 12, |
---|
50 | MESSAGE_QUEUE_MP_GET_NUMBER_PENDING_REQUEST = 13, |
---|
51 | MESSAGE_QUEUE_MP_GET_NUMBER_PENDING_RESPONSE = 14 |
---|
52 | } Message_queue_MP_Remote_operations; |
---|
53 | |
---|
54 | /* |
---|
55 | * The following data structure defines the packet used to perform |
---|
56 | * remote message queue operations. |
---|
57 | */ |
---|
58 | |
---|
59 | typedef struct { |
---|
60 | rtems_packet_prefix Prefix; |
---|
61 | Message_queue_MP_Remote_operations operation; |
---|
62 | rtems_name name; |
---|
63 | rtems_option option_set; |
---|
64 | Objects_Id proxy_id; |
---|
65 | unsigned32 count; |
---|
66 | unsigned32 size; |
---|
67 | unsigned32 pad0; |
---|
68 | CORE_message_queue_Buffer Buffer; |
---|
69 | } Message_queue_MP_Packet; |
---|
70 | |
---|
71 | /* |
---|
72 | * _Message_queue_MP_Send_process_packet |
---|
73 | * |
---|
74 | * DESCRIPTION: |
---|
75 | * |
---|
76 | * This routine performs a remote procedure call so that a |
---|
77 | * process operation can be performed on another node. |
---|
78 | */ |
---|
79 | |
---|
80 | void _Message_queue_MP_Send_process_packet ( |
---|
81 | Message_queue_MP_Remote_operations operation, |
---|
82 | Objects_Id message_queue_id, |
---|
83 | rtems_name name, |
---|
84 | Objects_Id proxy_id |
---|
85 | ); |
---|
86 | |
---|
87 | /* |
---|
88 | * _Message_queue_MP_Send_request_packet |
---|
89 | * |
---|
90 | * DESCRIPTION: |
---|
91 | * |
---|
92 | * This routine performs a remote procedure call so that a |
---|
93 | * directive operation can be initiated on another node. |
---|
94 | */ |
---|
95 | |
---|
96 | rtems_status_code _Message_queue_MP_Send_request_packet ( |
---|
97 | Message_queue_MP_Remote_operations operation, |
---|
98 | Objects_Id message_queue_id, |
---|
99 | void *buffer, |
---|
100 | unsigned32 *size_p, |
---|
101 | rtems_option option_set, |
---|
102 | Watchdog_Interval timeout |
---|
103 | ); |
---|
104 | |
---|
105 | /* |
---|
106 | * _Message_queue_MP_Send_response_packet |
---|
107 | * |
---|
108 | * DESCRIPTION: |
---|
109 | * |
---|
110 | * This routine performs a remote procedure call so that a |
---|
111 | * directive can be performed on another node. |
---|
112 | */ |
---|
113 | |
---|
114 | void _Message_queue_MP_Send_response_packet ( |
---|
115 | Message_queue_MP_Remote_operations operation, |
---|
116 | Objects_Id message_queue_id, |
---|
117 | Thread_Control *the_thread |
---|
118 | ); |
---|
119 | |
---|
120 | /* |
---|
121 | * |
---|
122 | * _Message_queue_MP_Process_packet |
---|
123 | * |
---|
124 | * DESCRIPTION: |
---|
125 | * |
---|
126 | * This routine performs the actions specific to this package for |
---|
127 | * the request from another node. |
---|
128 | */ |
---|
129 | |
---|
130 | void _Message_queue_MP_Process_packet ( |
---|
131 | rtems_packet_prefix *the_packet_prefix |
---|
132 | ); |
---|
133 | |
---|
134 | /* |
---|
135 | * _Message_queue_MP_Send_object_was_deleted |
---|
136 | * |
---|
137 | * DESCRIPTION: |
---|
138 | * |
---|
139 | * This routine is invoked indirectly by the thread queue |
---|
140 | * when a proxy has been removed from the thread queue and |
---|
141 | * the remote node must be informed of this. |
---|
142 | */ |
---|
143 | |
---|
144 | void _Message_queue_MP_Send_object_was_deleted ( |
---|
145 | Thread_Control *the_proxy |
---|
146 | ); |
---|
147 | |
---|
148 | /* |
---|
149 | * _Message_queue_MP_Send_extract_proxy |
---|
150 | * |
---|
151 | * DESCRIPTION: |
---|
152 | * |
---|
153 | * This routine is invoked when a task is deleted and it |
---|
154 | * has a proxy which must be removed from a thread queue and |
---|
155 | * the remote node must be informed of this. |
---|
156 | */ |
---|
157 | |
---|
158 | void _Message_queue_MP_Send_extract_proxy ( |
---|
159 | Thread_Control *the_thread |
---|
160 | ); |
---|
161 | |
---|
162 | /* |
---|
163 | * _Message_queue_MP_Get_packet |
---|
164 | * |
---|
165 | * DESCRIPTION: |
---|
166 | * |
---|
167 | * This function is used to obtain a message queue mp packet. |
---|
168 | */ |
---|
169 | |
---|
170 | Message_queue_MP_Packet *_Message_queue_MP_Get_packet ( void ); |
---|
171 | |
---|
172 | #ifdef __cplusplus |
---|
173 | } |
---|
174 | #endif |
---|
175 | |
---|
176 | #endif |
---|
177 | /* end of file */ |
---|