RTEMS CPU Kit with SuperCore  4.11.3
messageimpl.h
Go to the documentation of this file.
1 
8 /* COPYRIGHT (c) 1989-2008.
9  * On-Line Applications Research Corporation (OAR).
10  *
11  * The license and distribution terms for this file may be
12  * found in the file LICENSE in this distribution or at
13  * http://www.rtems.org/license/LICENSE.
14  */
15 
16 #ifndef _RTEMS_RTEMS_MESSAGEIMPL_H
17 #define _RTEMS_RTEMS_MESSAGEIMPL_H
18 
19 #include <rtems/rtems/message.h>
20 #include <rtems/score/objectimpl.h>
22 
23 #ifdef __cplusplus
24 extern "C" {
25 #endif
26 
41 #ifndef RTEMS_MESSAGE_EXTERN
42 #define RTEMS_MESSAGE_EXTERN extern
43 #endif
44 
50 typedef enum {
62 
68 
75 
87  rtems_id id,
88  const void *buffer,
89  size_t size,
90  Message_queue_Submit_types submit_type
91 );
92 
104  uint32_t the_message_queue_status
105 );
106 
115  Message_queue_Control *the_message_queue
116 )
117 {
118  _Objects_Free( &_Message_queue_Information, &the_message_queue->Object );
119 }
120 
134  Objects_Id id,
135  Objects_Locations *location
136 )
137 {
138  return (Message_queue_Control *)
139  _Objects_Get( &_Message_queue_Information, id, location );
140 }
141 
143 _Message_queue_Get_interrupt_disable(
144  Objects_Id id,
145  Objects_Locations *location,
146  ISR_lock_Context *lock_context
147 )
148 {
150  &_Message_queue_Information,
151  id,
152  location,
153  lock_context
154  );
155 }
156 
157 RTEMS_INLINE_ROUTINE Message_queue_Control *_Message_queue_Allocate( void )
158 {
159  return (Message_queue_Control *)
160  _Objects_Allocate( &_Message_queue_Information );
161 }
162 
165 #ifdef __cplusplus
166 }
167 #endif
168 
169 #if defined(RTEMS_MULTIPROCESSING)
170 #include <rtems/rtems/msgmp.h>
171 #endif
172 
173 #endif
174 /* end of include file */
void _Objects_Free(Objects_Information *information, Objects_Control *the_object)
Frees an object.
Definition: objectfree.c:25
RTEMS_INLINE_ROUTINE void _Message_queue_Free(Message_queue_Control *the_message_queue)
Deallocates a message queue control block into the inactive chain of free message queue control block...
Definition: messageimpl.h:114
This value indicates the user considers the message to be urgent and wants it inserted at the head of...
Definition: messageimpl.h:60
Objects_Id rtems_id
Used to manage and manipulate RTEMS object identifiers.
Definition: types.h:80
Inlined Routines in the Core Message Handler.
Objects_Control * _Objects_Allocate(Objects_Information *information)
Allocates an object.
Definition: objectallocate.c:101
#define RTEMS_INLINE_ROUTINE
The following (in conjunction with compiler arguments) are used to choose between the use of static i...
Definition: basedefs.h:135
RTEMS_MESSAGE_EXTERN Objects_Information _Message_queue_Information
The following defines the information control block used to manage this class of objects.
Definition: messageimpl.h:67
#define RTEMS_MESSAGE_EXTERN
This constant is defined to extern most of the time when using this header file.
Definition: messageimpl.h:42
Objects_Control Object
This field is the inherited object characteristics.
Definition: message.h:55
Message_queue_Submit_types
The following enumerated type details the modes in which a message may be submitted to a message queu...
Definition: messageimpl.h:50
Message Manager MP Support.
rtems_status_code _Message_queue_Translate_core_message_queue_return_code(uint32_t the_message_queue_status)
Message queue Translate Core Message Queue Return Code.
Definition: msgqtranslatereturncode.c:43
rtems_status_code _Message_queue_Submit(rtems_id id, const void *buffer, size_t size, Message_queue_Submit_types submit_type)
Message_queue_Submit.
The following records define the control block used to manage each message queue. ...
Definition: message.h:53
Objects_Control * _Objects_Get(Objects_Information *information, Objects_Id id, Objects_Locations *location)
Maps object ids to object control blocks.
Definition: objectget.c:23
rtems_status_code
Classic API Status.
Definition: status.h:46
void _Message_queue_Manager_initialization(void)
Message Queue Manager Initialization.
Definition: msg.c:34
The following defines the structure for the information used to manage each class of objects...
Definition: objectimpl.h:136
RTEMS_INLINE_ROUTINE Message_queue_Control * _Message_queue_Get(Objects_Id id, Objects_Locations *location)
Maps message queue IDs to message queue control blocks.
Definition: messageimpl.h:133
Objects_Locations
This enumerated type lists the locations which may be returned by _Objects_Get.
Definition: objectimpl.h:117
Local ISR lock context for acquire and release pairs.
Definition: isrlock.h:65
This value indicates the user wants to send the message using the normal message insertion protocol (...
Definition: messageimpl.h:55
Inlined Routines in the Object Handler.
uint32_t Objects_Id
The following type defines the control block used to manage object IDs.
Definition: object.h:122
Objects_Control * _Objects_Get_isr_disable(Objects_Information *information, Objects_Id id, Objects_Locations *location, ISR_lock_Context *lock_context)
Maps object ids to object control blocks.
Definition: objectgetisr.c:23