RTEMS 6.1-rc2
Loading...
Searching...
No Matches
msgmp.h
Go to the documentation of this file.
1/* SPDX-License-Identifier: BSD-2-Clause */
2
12/* COPYRIGHT (c) 1989-2013.
13 * On-Line Applications Research Corporation (OAR).
14 *
15 * Redistribution and use in source and binary forms, with or without
16 * modification, are permitted provided that the following conditions
17 * are met:
18 * 1. Redistributions of source code must retain the above copyright
19 * notice, this list of conditions and the following disclaimer.
20 * 2. Redistributions in binary form must reproduce the above copyright
21 * notice, this list of conditions and the following disclaimer in the
22 * documentation and/or other materials provided with the distribution.
23 *
24 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
25 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
26 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
27 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
28 * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
29 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
30 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
31 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
32 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
33 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
34 * POSSIBILITY OF SUCH DAMAGE.
35 */
36
37#ifndef _RTEMS_RTEMS_MSGMP_H
38#define _RTEMS_RTEMS_MSGMP_H
39
40#ifndef _RTEMS_RTEMS_MESSAGEIMPL_H
41# error "Never use <rtems/rtems/msgmp.h> directly; include <rtems/rtems/messageimpl.h> instead."
42#endif
43
45
46#ifdef __cplusplus
47extern "C" {
48#endif
49
66typedef enum {
67 MESSAGE_QUEUE_MP_ANNOUNCE_CREATE = 0,
68 MESSAGE_QUEUE_MP_ANNOUNCE_DELETE = 1,
69 MESSAGE_QUEUE_MP_EXTRACT_PROXY = 2,
70 MESSAGE_QUEUE_MP_RECEIVE_REQUEST = 3,
71 MESSAGE_QUEUE_MP_RECEIVE_RESPONSE = 4,
72 MESSAGE_QUEUE_MP_SEND_REQUEST = 5,
73 MESSAGE_QUEUE_MP_SEND_RESPONSE = 6,
74 MESSAGE_QUEUE_MP_URGENT_REQUEST = 7,
75 MESSAGE_QUEUE_MP_URGENT_RESPONSE = 8,
76 MESSAGE_QUEUE_MP_BROADCAST_REQUEST = 9,
77 MESSAGE_QUEUE_MP_BROADCAST_RESPONSE = 10,
78 MESSAGE_QUEUE_MP_FLUSH_REQUEST = 11,
79 MESSAGE_QUEUE_MP_FLUSH_RESPONSE = 12,
80 MESSAGE_QUEUE_MP_GET_NUMBER_PENDING_REQUEST = 13,
81 MESSAGE_QUEUE_MP_GET_NUMBER_PENDING_RESPONSE = 14
83
88typedef struct {
89 rtems_packet_prefix Prefix;
91 rtems_name name;
92 rtems_option option_set;
93 Objects_Id proxy_id;
94 uint32_t count;
95 uint32_t size;
96 uint32_t buffer[ RTEMS_ZERO_LENGTH_ARRAY ];
98
99#define MESSAGE_QUEUE_MP_PACKET_SIZE \
100 offsetof(Message_queue_MP_Packet, buffer)
101
102static inline bool _Message_queue_MP_Is_remote( Objects_Id id )
103{
105}
106
117 Thread_Control *the_thread,
118 rtems_id id
119);
120
129 Objects_Id message_queue_id,
130 rtems_name name,
131 Objects_Id proxy_id
132);
133
138 rtems_id id,
139 const void *buffer,
140 size_t size,
141 uint32_t *count
142);
143
148 rtems_id id,
149 uint32_t *count
150);
151
156 rtems_id id,
157 uint32_t *count
158);
159
164 rtems_id id,
165 void *buffer,
166 size_t *size,
167 rtems_option option_set,
168 rtems_interval timeout
169);
170
175 rtems_id id,
176 const void *buffer,
177 size_t size
178);
179
184 rtems_id id,
185 const void *buffer,
186 size_t size
187);
188
197 Thread_Control *the_proxy,
198 Objects_Id mp_id
199);
200
203#ifdef __cplusplus
204}
205#endif
206
207#endif
208/* end of file */
#define RTEMS_ZERO_LENGTH_ARRAY
This constant represents the element count of a zero-length array.
Definition: basedefs.h:1032
uint32_t rtems_option
This type represents a Classic API directive option set.
Definition: options.h:126
rtems_status_code
This enumeration provides status codes for directives of the Classic API.
Definition: status.h:85
uint32_t rtems_name
This type represents Classic API object names.
Definition: types.h:226
Objects_Id rtems_id
This type represents RTEMS object identifiers.
Definition: types.h:94
Watchdog_Interval rtems_interval
This type represents clock tick intervals.
Definition: types.h:114
void _Message_queue_MP_Send_object_was_deleted(Thread_Control *the_proxy, Objects_Id mp_id)
_Message_queue_MP_Send_object_was_deleted
Definition: msgmp.c:564
void _Message_queue_Core_message_queue_mp_support(Thread_Control *the_thread, rtems_id id)
Message_queue_Core_message_queue_mp_support.
Definition: msgmp.c:596
rtems_status_code _Message_queue_MP_Receive(rtems_id id, void *buffer, size_t *size, rtems_option option_set, rtems_interval timeout)
Issues a remote rtems_message_queue_receive() request.
Definition: msgmp.c:279
rtems_status_code _Message_queue_MP_Send(rtems_id id, const void *buffer, size_t size)
Issues a remote rtems_message_queue_send() request.
Definition: msgmp.c:297
void _Message_queue_MP_Send_process_packet(Message_queue_MP_Remote_operations operation, Objects_Id message_queue_id, rtems_name name, Objects_Id proxy_id)
_Message_queue_MP_Send_process_packet
Definition: msgmp.c:66
rtems_status_code _Message_queue_MP_Broadcast(rtems_id id, const void *buffer, size_t size, uint32_t *count)
Issues a remote rtems_message_queue_broadcast() request.
Definition: msgmp.c:229
rtems_status_code _Message_queue_MP_Flush(rtems_id id, uint32_t *count)
Issues a remote rtems_message_queue_flush() request.
Definition: msgmp.c:247
rtems_status_code _Message_queue_MP_Urgent(rtems_id id, const void *buffer, size_t size)
Issues a remote rtems_message_queue_urgent() request.
Definition: msgmp.c:313
Message_queue_MP_Remote_operations
Definition: msgmp.h:66
rtems_status_code _Message_queue_MP_Get_number_pending(rtems_id id, uint32_t *count)
Issues a remote rtems_message_queue_get_number_pending() request.
Definition: msgmp.c:263
Objects_Information _Message_queue_Information
The Classic Message Queue objects information.
bool _Objects_MP_Is_remote(Objects_Id id, const Objects_Information *information)
Checks if the object identifier is in the global object identifier cache of the specified object info...
Definition: objectmp.c:368
uint32_t Objects_Id
Definition: object.h:101
This header file provides interfaces of the MPCI Handler which are only used by the implementation.
Definition: msgmp.h:88
Definition: thread.h:812