39#ifndef _RTEMS_SCORE_COREMSGIMPL_H
40#define _RTEMS_SCORE_COREMSGIMPL_H
67#define CORE_MESSAGE_QUEUE_SEND_REQUEST INT_MAX
75#define CORE_MESSAGE_QUEUE_URGENT_REQUEST INT_MIN
107typedef void *( *CORE_message_queue_Allocate_buffers )(
166 uint32_t maximum_pending_messages,
167 size_t maximum_message_size,
211#if defined(FUNCTIONALITY_NOT_CURRENTLY_USED_BY_ANY_API)
224 void _CORE_message_queue_Flush_waiting_threads(
287 Thread_Control *executing,
330 Thread_Control *executing,
353 const void *content_source,
436static inline void _CORE_message_queue_Acquire(
441 _Thread_queue_Acquire( &the_message_queue->
Wait_queue, queue_context );
450static inline void _CORE_message_queue_Acquire_critical(
455 _Thread_queue_Acquire_critical( &the_message_queue->
Wait_queue, queue_context );
464static inline void _CORE_message_queue_Release(
469 _Thread_queue_Release( &the_message_queue->
Wait_queue, queue_context );
482static inline void _CORE_message_queue_Copy_buffer (
488 memcpy(destination, source, size);
503_CORE_message_queue_Allocate_message_buffer (
520static inline void _CORE_message_queue_Free_message_buffer (
541static inline int _CORE_message_queue_Get_message_priority (
545 #if defined(RTEMS_SCORE_COREMSG_ENABLE_MESSAGE_PRIORITY)
572#if defined(RTEMS_SCORE_COREMSG_ENABLE_NOTIFICATION)
584 static inline bool _CORE_message_queue_Is_notify_enabled (
588 return (the_message_queue->notify_handler != NULL);
601#if defined(RTEMS_SCORE_COREMSG_ENABLE_NOTIFICATION)
604 CORE_message_queue_Notify_Handler the_handler
607 the_message_queue->notify_handler = the_handler;
611 #define _CORE_message_queue_Set_notify( the_message_queue, the_handler ) \
630static inline Thread_Control *_CORE_message_queue_Dequeue_receiver(
639 Thread_Control *the_thread;
658 if ( heads == NULL ) {
670 the_thread->
Wait.
count = (uint32_t) submit_type;
672 _CORE_message_queue_Copy_buffer(
This header file provides interfaces of the Chain Handler which are only used by the implementation.
This header file provides interfaces of the Message Queue Handler which are only used by the implemen...
#define CORE_MESSAGE_QUEUE_URGENT_REQUEST
Used when prepending messages onto a message queue.
Definition coremsgimpl.h:75
int CORE_message_queue_Submit_types
The modes in which a message may be submitted to a message queue.
Definition coremsgimpl.h:87
void _CORE_message_queue_Insert_message(CORE_message_queue_Control *the_message_queue, CORE_message_queue_Buffer *the_message, const void *content_source, size_t content_size, CORE_message_queue_Submit_types submit_type)
Inserts a message into the message queue.
Definition coremsginsert.c:63
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)
Submits a message to the message queue.
Definition coremsgsubmit.c:48
#define CORE_MESSAGE_QUEUE_SEND_REQUEST
Used when appending messages onto a message queue.
Definition coremsgimpl.h:67
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)
Seizes a message from the message queue.
Definition coremsgseize.c:48
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.
Definition coremsg.c:54
void _CORE_message_queue_Close(CORE_message_queue_Control *the_message_queue, Thread_queue_Context *queue_context)
Closes a message queue.
Definition coremsgclose.c:55
#define _CORE_message_queue_Set_notify(the_message_queue, the_handler)
Initializes notification information.
Definition coremsgimpl.h:611
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:107
CORE_message_queue_Disciplines
The possible blocking disciplines for a message queue.
Definition coremsg.h:86
uint32_t _CORE_message_queue_Flush(CORE_message_queue_Control *the_message_queue, Thread_queue_Context *queue_context)
Flushes pending messages.
Definition coremsgflush.c:44
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)
Broadcasts a message to the message queue.
Definition coremsgbroadcast.c:45
void * _CORE_message_queue_Workspace_allocate(CORE_message_queue_Control *the_message_queue, size_t size, const void *arg)
This handler allocates the message buffer storage area for a message queue from the RTEMS Workspace.
Definition coremsgwkspace.c:44
Status_Control
Status codes.
Definition status.h:111
void _Thread_queue_Resume(Thread_queue_Queue *queue, Thread_Control *the_thread, Thread_queue_Context *queue_context)
Resumes the extracted or surrendered thread.
Definition threadqenqueue.c:663
struct _Thread_queue_Heads Thread_queue_Heads
Thread queue heads.
This header file provides the interfaces of the Operation Status Support.
The structure is used to organize message buffers of a message queue.
Definition coremsgbuffer.h:64
Chain_Node Node
This member is used to enqueue the buffer in the pending or free buffer queue of a message queue.
Definition coremsgbuffer.h:69
int priority
This member defines the priority of this message.
Definition coremsgbuffer.h:76
Control block used to manage each message queue.
Definition coremsg.h:113
Chain_Control Inactive_messages
Definition coremsg.h:163
const Thread_queue_Operations * operations
The thread queue operations according to the blocking discipline.
Definition coremsg.h:122
uint32_t number_of_pending_messages
Definition coremsg.h:130
Thread_queue_Control Wait_queue
Definition coremsg.h:117
Chain_Control Pending_messages
Definition coremsg.h:138
Thread queue context for the thread queue methods.
Definition threadq.h:216
Thread_queue_Queue Queue
The actual thread queue.
Definition threadq.h:640
Thread_queue_Surrender_operation surrender
This operation is used to dequeue the thread from the thread queue and optionally surrender the threa...
Definition threadq.h:593
Thread_queue_Heads * heads
The thread queue heads.
Definition threadq.h:451
Thread_Wait_information Wait
Definition thread.h:877
This header file provides the interfaces of the Thread Handler related to thread dispatching.
This header file provides interfaces of the Thread Queue Handler which are only used by the implement...