25 #include <rtems/sysinit.h> 27 static void *_Message_queue_Get_buffers(
61 Status_Control status;
62 #if defined(RTEMS_MULTIPROCESSING) 82 #if defined(RTEMS_MULTIPROCESSING) 83 if ( _System_state_Is_multiprocessing ) {
84 is_global = _Attributes_Is_global( config->
attributes );
96 size_t max_packet_payload_size = _MPCI_table->maximum_packet_size
97 - MESSAGE_QUEUE_MP_PACKET_SIZE;
106 the_message_queue = _Message_queue_Allocate();
108 if ( !the_message_queue ) {
113 #if defined(RTEMS_MULTIPROCESSING) 116 && !_Objects_MP_Allocate_and_open(
128 the_message_queue->is_global = is_global;
146 if ( status != STATUS_SUCCESSFUL ) {
147 #if defined(RTEMS_MULTIPROCESSING) 155 return STATUS_GET_CLASSIC( status );
160 &the_message_queue->
Object,
166 #if defined(RTEMS_MULTIPROCESSING) 168 _Message_queue_MP_Send_process_packet(
169 MESSAGE_QUEUE_MP_ANNOUNCE_CREATE,
180 static void _Message_queue_Manager_initialization(
void )
186 _Message_queue_Manager_initialization,
187 RTEMS_SYSINIT_CLASSIC_MESSAGE_QUEUE,
188 RTEMS_SYSINIT_ORDER_MIDDLE
This status code indicates you have attempted to create too many instances of a particular object cla...
static __inline__ void _Objects_Allocator_unlock(void)
Unlocks the object allocator mutex.
This header file defines support services of the API.
RTEMS_INLINE_ROUTINE bool _Attributes_Is_priority(rtems_attribute attribute_set)
Checks if the priority attribute is enabled in the attribute_set.
Classic Message Queue Manager Implementation.
Inlined Routines in the Core Message Handler.
void _Objects_Initialize_information(Objects_Information *information)
Initializes the specified objects information.
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...
void(* storage_free)(void *)
This member defines the optional handler to free the message buffer storage area. ...
static bool rtems_is_name_valid(rtems_status_code name)
Returns true, if the specified object name is valid, otherwise returns false.
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.
This status code indicates that a specified number was invalid.
void(* free_message_buffers)(void *)
This member contains the optional message buffer storage area free handler.
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.
rtems_name name
This member defines the name of the message queue.
Objects_Information _Message_queue_Information
The Classic Message Queue objects information.
This status code indicates successful completion.
static __inline__ void _Objects_Open(Objects_Information *information, Objects_Control *the_object, Objects_Name name)
Places the_object control pointer and object name in the Local Pointer and Local Name Tables...
rtems_status_code
This enumeration provides status codes for directives of the Classic API.
This structure defines the configuration of a message queue constructed by rtems_message_queue_constr...
CORE_message_queue_Control message_queue
void * storage_area
This member shall point to the message buffer storage area begin.
This status code indicates that a specified address was invalid.
CORE_message_queue_Disciplines
The possible blocking disciplines for a message queue.
Status_Control _CORE_message_queue_Initialize(CORE_message_queue_Control *the_message_queue, CORE_message_queue_Disciplines discipline, uint32_t maximum_pending_messages, size_t maximum_message_size, CORE_message_queue_Allocate_buffers allocate_buffers, const void *arg)
Initializes a message queue.
Classic Attributes Implementation.
Objects_Id rtems_id
Values of this type identify an RTEMS object.
Control block used to manage each message queue.
rtems_status_code rtems_message_queue_construct(const rtems_message_queue_config *config, rtems_id *id)
Constructs a message queue from the specified the message queue configuration.
This status code indicates that an object name was invalid.
rtems_attribute attributes
This member defines the attributes of the message queue.
size_t storage_size
This member defines size of the message buffer storage area in bytes.
This status code indicates that a specified size was invalid.
size_t maximum_message_size
This member defines the maximum message size supported by the message queue.
uint32_t maximum_pending_messages
This member defines the maximum number of pending messages supported by the message queue...