source: rtems/cpukit/rtems/include/rtems/rtems/msgmp.h @ 641b44c2

5
Last change on this file since 641b44c2 was 641b44c2, checked in by Sebastian Huber <sebastian.huber@…>, on 05/20/16 at 12:21:12

rtems: _Message_queue_Get_interrupt_disable()

Use _Objects_Get_local() for _Message_queue_Get_interrupt_disable() to
get rid of the location parameter. Move remote object handling to
message queue MPCI support.

  • Property mode set to 100644
File size: 5.4 KB
Line 
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
28extern "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 */
45typedef 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 */
67typedef 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
82RTEMS_INLINE_ROUTINE bool _Message_queue_MP_Is_remote( Objects_Id id )
83{
84  return _Objects_MP_Is_remote( id, &_Message_queue_Information );
85}
86
87/**
88 *  @brief Message_queue_Core_message_queue_mp_support
89 *
90 *  Input parameters:
91 *    the_thread - the remote thread the message was submitted to
92 *    id         - id of the message queue
93 *
94 *  Output parameters: NONE
95 */
96void  _Message_queue_Core_message_queue_mp_support (
97  Thread_Control *the_thread,
98  rtems_id        id
99);
100
101/**
102 *  @brief _Message_queue_MP_Send_process_packet
103 *
104 *  This routine performs a remote procedure call so that a
105 *  process operation can be performed on another node.
106 */
107void _Message_queue_MP_Send_process_packet (
108  Message_queue_MP_Remote_operations operation,
109  Objects_Id                         message_queue_id,
110  rtems_name                         name,
111  Objects_Id                         proxy_id
112);
113
114/**
115 * @brief Issues a remote rtems_message_queue_broadcast() request.
116 */
117rtems_status_code _Message_queue_MP_Broadcast(
118  rtems_id    id,
119  const void *buffer,
120  size_t      size,
121  uint32_t   *count
122);
123
124/**
125 * @brief Issues a remote rtems_message_queue_flush() request.
126 */
127rtems_status_code _Message_queue_MP_Flush(
128  rtems_id  id,
129  uint32_t *count
130);
131
132/**
133 * @brief Issues a remote rtems_message_queue_get_number_pending() request.
134 */
135rtems_status_code _Message_queue_MP_Get_number_pending(
136  rtems_id  id,
137  uint32_t *count
138);
139
140/**
141 * @brief Issues a remote rtems_message_queue_receive() request.
142 */
143rtems_status_code _Message_queue_MP_Receive(
144  rtems_id        id,
145  void           *buffer,
146  size_t         *size,
147  rtems_option    option_set,
148  rtems_interval  timeout
149);
150
151/**
152 * @brief Issues a remote rtems_message_queue_send() request.
153 */
154rtems_status_code _Message_queue_MP_Send(
155  rtems_id    id,
156  const void *buffer,
157  size_t      size
158);
159
160/**
161 * @brief Issues a remote rtems_message_queue_urgent() request.
162 */
163rtems_status_code _Message_queue_MP_Urgent(
164  rtems_id    id,
165  const void *buffer,
166  size_t      size
167);
168
169/**
170 *
171 * @brief _Message_queue_MP_Process_packet
172 *
173 * This routine performs the actions specific to this package for
174 * the request from another node.
175 */
176void _Message_queue_MP_Process_packet (
177  rtems_packet_prefix *the_packet_prefix
178);
179
180/**
181 *  @brief _Message_queue_MP_Send_object_was_deleted
182 *
183 *  This routine is invoked indirectly by the thread queue
184 *  when a proxy has been removed from the thread queue and
185 *  the remote node must be informed of this.
186 */
187void _Message_queue_MP_Send_object_was_deleted (
188  Thread_Control *the_proxy,
189  Objects_Id      mp_id
190);
191
192/**
193 *  @brief _Message_queue_MP_Send_extract_proxy
194 *
195 *  This routine is invoked when a task is deleted and it
196 *  has a proxy which must be removed from a thread queue and
197 *  the remote node must be informed of this.
198 */
199void _Message_queue_MP_Send_extract_proxy (
200  Thread_Control *the_thread,
201  Objects_Id      id
202);
203
204/**@}*/
205
206#ifdef __cplusplus
207}
208#endif
209
210#endif
211/* end of file */
Note: See TracBrowser for help on using the repository browser.