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