RTEMS
messageimpl.h
Go to the documentation of this file.
1 
9 /* COPYRIGHT (c) 1989-2008.
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.org/license/LICENSE.
15  */
16 
17 #ifndef _RTEMS_RTEMS_MESSAGEIMPL_H
18 #define _RTEMS_RTEMS_MESSAGEIMPL_H
19 
21 #include <rtems/score/objectimpl.h>
23 
24 #ifdef __cplusplus
25 extern "C" {
26 #endif
27 
41 typedef enum {
53 
65  rtems_id id,
66  const void *buffer,
67  size_t size,
68  Message_queue_Submit_types submit_type
69 );
70 
79  Message_queue_Control *the_message_queue
80 )
81 {
82  _Objects_Free( &_Message_queue_Information, &the_message_queue->Object );
83 }
84 
86  Objects_Id id,
87  Thread_queue_Context *queue_context
88 )
89 {
90  _Thread_queue_Context_initialize( queue_context );
92  id,
93  &queue_context->Lock_context.Lock_context,
95  );
96 }
97 
98 RTEMS_INLINE_ROUTINE Message_queue_Control *_Message_queue_Allocate( void )
99 {
100  return (Message_queue_Control *)
102 }
103 
116  const rtems_message_queue_config *config,
117  rtems_id *id,
118  CORE_message_queue_Allocate_buffers allocate_buffers
119 );
120 
123 #ifdef __cplusplus
124 }
125 #endif
126 
127 #if defined(RTEMS_MULTIPROCESSING)
128 #include <rtems/rtems/msgmp.h>
129 #endif
130 
131 #endif
132 /* end of include file */
Thread queue context for the thread queue methods.
Definition: threadq.h:198
Inlined Routines in the Core Message Handler.
static __inline__ 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:78
static __inline__ void _Thread_queue_Context_initialize(Thread_queue_Context *queue_context)
Initializes a thread queue context.
Definition: threadqimpl.h:152
Objects_Control Object
Definition: messagedata.h:40
void *(* CORE_message_queue_Allocate_buffers)(CORE_message_queue_Control *the_message_queue, size_t size, const void *arg)
This handler shall allocate the message buffer storage area for a message queue.
Definition: coremsgimpl.h:89
Message_queue_Submit_types
Definition: messageimpl.h:41
rtems_status_code _Message_queue_Submit(rtems_id id, const void *buffer, size_t size, Message_queue_Submit_types submit_type)
Message_queue_Submit.
rtems_status_code _Message_queue_Create(const rtems_message_queue_config *config, rtems_id *id, CORE_message_queue_Allocate_buffers allocate_buffers)
Creates a message queue.
Definition: msgqconstruct.c:53
Objects_Control * _Objects_Allocate(Objects_Information *information)
Allocates an object.
Objects_Information _Message_queue_Information
The Classic Message Queue objects information.
Definition: msg.c:47
Inlined Routines in the Object Handler.
rtems_status_code
This enumeration provides status codes for directives of the Classic API.
Definition: status.h:82
This structure defines the configuration of a message queue constructed by rtems_message_queue_constr...
Definition: message.h:87
Thread_queue_Lock_context Lock_context
The lock context for the thread queue acquire and release operations.
Definition: threadq.h:203
Classic Message Queue Manager API.
Objects_Id rtems_id
Values of this type identify an RTEMS object.
Definition: types.h:99
uint32_t Objects_Id
Definition: object.h:80
Objects_Control * _Objects_Get(Objects_Id id, ISR_lock_Context *lock_context, const Objects_Information *information)
Maps the specified object identifier to the associated local object control block.
ISR_lock_Context Lock_context
The lock context for the thread queue acquire and release operations.
Definition: threadq.h:130
#define RTEMS_INLINE_ROUTINE
Gives a hint to the compiler in a function declaration to inline this function.
Definition: basedefs.h:683
static __inline__ void _Objects_Free(Objects_Information *information, Objects_Control *the_object)
Frees an object.
Definition: objectimpl.h:933