19 #ifndef _RTEMS_SCORE_COREMSGIMPL_H 20 #define _RTEMS_SCORE_COREMSGIMPL_H 23 #include <rtems/score/status.h> 25 #include <rtems/score/threaddispatch.h> 46 #define CORE_MESSAGE_QUEUE_SEND_REQUEST INT_MAX 54 #define CORE_MESSAGE_QUEUE_URGENT_REQUEST INT_MIN 92 uint32_t maximum_pending_messages,
93 size_t maximum_message_size
135 #if defined(FUNCTIONALITY_NOT_CURRENTLY_USED_BY_ANY_API) 147 void _CORE_message_queue_Flush_waiting_threads(
206 CORE_message_queue_Submit_types submit_type,
268 const void *content_source,
270 CORE_message_queue_Submit_types submit_type
316 _Thread_queue_Acquire( &the_message_queue->
Wait_queue, queue_context );
324 _Thread_queue_Acquire_critical( &the_message_queue->
Wait_queue, queue_context );
332 _Thread_queue_Release( &the_message_queue->
Wait_queue, queue_context );
345 memcpy(destination, source, size);
383 #if defined(RTEMS_SCORE_COREMSG_ENABLE_MESSAGE_PRIORITY) 403 #if defined(RTEMS_SCORE_COREMSG_ENABLE_NOTIFICATION) 412 return (the_message_queue->notify_handler !=
NULL);
420 #if defined(RTEMS_SCORE_COREMSG_ENABLE_NOTIFICATION) 423 CORE_message_queue_Notify_Handler the_handler
426 the_message_queue->notify_handler = the_handler;
430 #define _CORE_message_queue_Set_notify( the_message_queue, the_handler ) \ 438 CORE_message_queue_Submit_types submit_type,
464 if ( the_thread ==
NULL ) {
469 the_thread->
Wait.
count = (uint32_t) submit_type;
RTEMS_INLINE_ROUTINE void _Chain_Append_unprotected(Chain_Control *the_chain, Chain_Node *the_node)
Append a node (unprotected).
Definition: chainimpl.h:679
Status_Control _CORE_message_queue_Submit(CORE_message_queue_Control *the_message_queue, Thread_Control *executing, const void *buffer, size_t size, CORE_message_queue_Submit_types submit_type, bool wait, Thread_queue_Context *queue_context)
Submit a message to the message queue.
Definition: coremsgsubmit.c:29
void _CORE_message_queue_Close(CORE_message_queue_Control *the_message_queue, Thread_queue_Context *queue_context)
Close a message queue.
Definition: coremsgclose.c:35
RTEMS_INLINE_ROUTINE Thread_Control * _Thread_queue_First_locked(Thread_queue_Control *the_thread_queue, const Thread_queue_Operations *operations)
Returns the first thread on the thread queue if it exists, otherwise NULL.
Definition: threadqimpl.h:971
Thread_Wait_information Wait
Definition: thread.h:770
Thread queue context for the thread queue methods.
Definition: threadq.h:193
Status_Control _CORE_message_queue_Seize(CORE_message_queue_Control *the_message_queue, Thread_Control *executing, void *buffer, size_t *size_p, bool wait, Thread_queue_Context *queue_context)
Size a message from the message queue.
Definition: coremsgseize.c:27
Status_Control _CORE_message_queue_Broadcast(CORE_message_queue_Control *the_message_queue, const void *buffer, size_t size, uint32_t *count, Thread_queue_Context *queue_context)
Broadcast a message to the message queue.
Definition: coremsgbroadcast.c:24
Chain_Control Inactive_messages
Definition: coremsg.h:171
#define RTEMS_INLINE_ROUTINE
Definition: basedefs.h:65
Chain_Node Node
Definition: coremsg.h:89
int CORE_message_queue_Submit_types
The modes in which a message may be submitted to a message queue.
Definition: coremsgimpl.h:66
The organization of a message buffer.
Definition: coremsg.h:87
int priority
Definition: coremsg.h:92
const Thread_queue_Operations * operations
The thread queue operations according to the blocking discipline.
Definition: coremsg.h:140
uint32_t number_of_pending_messages
Definition: coremsg.h:148
RTEMS_INLINE_ROUTINE void _CORE_message_queue_Free_message_buffer(CORE_message_queue_Control *the_message_queue, CORE_message_queue_Buffer_control *the_message)
Definition: coremsgimpl.h:365
RTEMS_INLINE_ROUTINE int _CORE_message_queue_Get_message_priority(const CORE_message_queue_Buffer_control *the_message)
Definition: coremsgimpl.h:379
Thread_queue_Queue Queue
The actual thread queue.
Definition: threadq.h:578
void _CORE_message_queue_Insert_message(CORE_message_queue_Control *the_message_queue, CORE_message_queue_Buffer_control *the_message, const void *content_source, size_t content_size, CORE_message_queue_Submit_types submit_type)
Insert a message into the message queue.
Definition: coremsginsert.c:40
RTEMS_INLINE_ROUTINE Chain_Node * _Chain_Get_unprotected(Chain_Control *the_chain)
Get the first node (unprotected).
Definition: chainimpl.h:629
RTEMS_INLINE_ROUTINE CORE_message_queue_Buffer_control * _CORE_message_queue_Get_pending_message(CORE_message_queue_Control *the_message_queue)
Definition: coremsgimpl.h:395
#define CORE_MESSAGE_QUEUE_URGENT_REQUEST
Used when prepending messages onto a message queue.
Definition: coremsgimpl.h:54
void _Thread_queue_Extract_critical(Thread_queue_Queue *queue, const Thread_queue_Operations *operations, Thread_Control *the_thread, Thread_queue_Context *queue_context)
Extracts the thread from the thread queue and unblocks it.
Definition: threadqenqueue.c:599
Chain_Control Pending_messages
Definition: coremsg.h:156
#define CORE_MESSAGE_QUEUE_SEND_REQUEST
Used when appending messages onto a message queue.
Definition: coremsgimpl.h:46
bool _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)
Initialize a message queue.
Definition: coremsg.c:45
Constants and Structures Associated with the Message Queue Handler.
Control block used to manage each message queue.
Definition: coremsg.h:131
RTEMS_INLINE_ROUTINE void _CORE_message_queue_Copy_buffer(const void *source, void *destination, size_t size)
Definition: coremsgimpl.h:339
CORE_message_queue_Disciplines
The possible blocking disciplines for a message queue.
Definition: coremsg.h:104
uint32_t _CORE_message_queue_Flush(CORE_message_queue_Control *the_message_queue, Thread_queue_Context *queue_context)
Flush pending messages.
Definition: coremsgflush.c:24
unsigned size
Definition: tte.h:74
Thread_queue_Control Wait_queue
Definition: coremsg.h:135
#define NULL
Requests a GPIO pin group configuration.
Definition: bestcomm_api.h:77
#define _CORE_message_queue_Set_notify(the_message_queue, the_handler)
Definition: coremsgimpl.h:430
RTEMS_INLINE_ROUTINE CORE_message_queue_Buffer_control * _CORE_message_queue_Allocate_message_buffer(CORE_message_queue_Control *the_message_queue)
Definition: coremsgimpl.h:353