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