19 #ifndef _RTEMS_SCORE_COREMSGIMPL_H 20 #define _RTEMS_SCORE_COREMSGIMPL_H 45 #define CORE_MESSAGE_QUEUE_SEND_REQUEST INT_MAX 53 #define CORE_MESSAGE_QUEUE_URGENT_REQUEST INT_MIN 101 #define CORE_MESSAGE_QUEUE_STATUS_LAST CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED_WAIT 139 uint32_t maximum_pending_messages,
140 size_t maximum_message_size
185 #if defined(FUNCTIONALITY_NOT_CURRENTLY_USED_BY_ANY_API) 197 void _CORE_message_queue_Flush_waiting_threads(
263 Thread_Control *executing,
268 CORE_message_queue_Submit_types submit_type,
311 Thread_Control *executing,
338 CORE_message_queue_Submit_types submit_type
361 api_message_queue_mp_support,
389 api_message_queue_mp_support,
402 _Thread_queue_Acquire( &the_message_queue->
Wait_queue, lock_context );
410 _Thread_queue_Acquire_critical( &the_message_queue->
Wait_queue, lock_context );
412 #if defined(RTEMS_MULTIPROCESSING) 426 _Thread_queue_Release( &the_message_queue->
Wait_queue, lock_context );
427 #if defined(RTEMS_MULTIPROCESSING) 442 memcpy(destination, source, size);
480 #if defined(RTEMS_SCORE_COREMSG_ENABLE_MESSAGE_PRIORITY) 481 return the_message->priority;
498 #if defined(RTEMS_SCORE_COREMSG_ENABLE_MESSAGE_PRIORITY) 499 the_message->priority = priority;
528 #if defined(RTEMS_SCORE_COREMSG_ENABLE_NOTIFICATION) 537 return (the_message_queue->notify_handler != NULL);
545 #if defined(RTEMS_SCORE_COREMSG_ENABLE_NOTIFICATION) 548 CORE_message_queue_Notify_Handler the_handler,
552 the_message_queue->notify_handler = the_handler;
553 the_message_queue->notify_argument = the_argument;
557 #define _CORE_message_queue_Set_notify( \ 558 the_message_queue, the_handler, the_argument ) 565 CORE_message_queue_Submit_types submit_type,
569 Thread_Control *the_thread;
588 if ( the_thread == NULL ) {
593 the_thread->
Wait.
count = (uint32_t) submit_type;
This value indicates that a blocking send was unsuccessful.
Definition: coremsgimpl.h:83
RTEMS_INLINE_ROUTINE void _Chain_Append_unprotected(Chain_Control *the_chain, Chain_Node *the_node)
Append a node (unprotected).
Definition: chainimpl.h:743
RTEMS_INLINE_ROUTINE CORE_message_queue_Status _CORE_message_queue_Urgent(CORE_message_queue_Control *the_message_queue, const void *buffer, size_t size, Objects_Id id, CORE_message_queue_API_mp_support_callout api_message_queue_mp_support, bool wait, Watchdog_Interval timeout, ISR_lock_Context *lock_context)
This routine sends a message to the front of the specified message queue.
Definition: coremsgimpl.h:372
CORE_message_queue_Status
The possible set of Core Message Queue handler return statuses.
Definition: coremsgimpl.h:73
#define _CORE_message_queue_Set_notify(the_message_queue, the_handler, the_argument)
This routine initializes the notification information for the_message_queue.
Definition: coremsgimpl.h:557
This value indicates that the thread had to timeout while waiting to receive a message because one di...
Definition: coremsgimpl.h:91
uint32_t _CORE_message_queue_Flush(CORE_message_queue_Control *the_message_queue, ISR_lock_Context *lock_context)
Flush pending messages.
Definition: coremsgflush.c:24
Chain_Control Inactive_messages
This chain is the set of inactive messages.
Definition: coremsg.h:180
#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
This value indicates that a receive was unsuccessful.
Definition: coremsgimpl.h:81
RTEMS_INLINE_ROUTINE void _Thread_Dispatch_enable(Per_CPU_Control *cpu_self)
Enables thread dispatching.
Definition: threaddispatch.h:304
CORE_message_queue_Status _CORE_message_queue_Broadcast(CORE_message_queue_Control *the_message_queue, const void *buffer, size_t size, Objects_Id id, CORE_message_queue_API_mp_support_callout api_message_queue_mp_support, uint32_t *count, ISR_lock_Context *lock_context)
Broadcast a message to the message queue.
Definition: coremsgbroadcast.c:24
CORE_message_queue_Status _CORE_message_queue_Submit(CORE_message_queue_Control *the_message_queue, Thread_Control *executing, const void *buffer, size_t size, Objects_Id id, CORE_message_queue_API_mp_support_callout api_message_queue_mp_support, CORE_message_queue_Submit_types submit_type, bool wait, Watchdog_Interval timeout, ISR_lock_Context *lock_context)
Submit a message to the message queue.
Definition: coremsgsubmit.c:28
Control block used to manage the attributes of each message queue.
Definition: coremsg.h:118
Chain_Node Node
This element allows this structure to be placed on chains.
Definition: coremsg.h:90
int CORE_message_queue_Submit_types
The modes in which a message may be submitted to a message queue.
Definition: coremsgimpl.h:65
The organization of a message buffer.
Definition: coremsg.h:88
This value indicates that a blocking receive was unsuccessful.
Definition: coremsgimpl.h:93
RTEMS_INLINE_ROUTINE Per_CPU_Control * _Thread_Dispatch_disable(void)
Disables thread dispatching.
Definition: threaddispatch.h:277
uint32_t number_of_pending_messages
This element is the number of messages which are currently pending.
Definition: coremsg.h:155
RTEMS_INLINE_ROUTINE void _CORE_message_queue_Free_message_buffer(CORE_message_queue_Control *the_message_queue, CORE_message_queue_Buffer_control *the_message)
This routine frees a message buffer to the inactive message buffer chain.
Definition: coremsgimpl.h:462
RTEMS_INLINE_ROUTINE int _CORE_message_queue_Get_message_priority(const CORE_message_queue_Buffer_control *the_message)
This function returns the priority of the_message.
Definition: coremsgimpl.h:476
void _Thread_queue_Extract_critical(Thread_queue_Control *the_thread_queue, Thread_Control *the_thread, ISR_lock_Context *lock_context)
Extracts the thread from the thread queue and unblocks it.
Definition: threadqenqueue.c:152
RTEMS_INLINE_ROUTINE CORE_message_queue_Status _CORE_message_queue_Send(CORE_message_queue_Control *the_message_queue, const void *buffer, size_t size, Objects_Id id, CORE_message_queue_API_mp_support_callout api_message_queue_mp_support, bool wait, Watchdog_Interval timeout, ISR_lock_Context *lock_context)
This routine sends a message to the end of the specified message queue.
Definition: coremsgimpl.h:344
void(* CORE_message_queue_API_mp_support_callout)(Thread_Control *, Objects_Id)
Callout provides to support global/multiprocessor operations.
Definition: coremsgimpl.h:109
void _CORE_message_queue_Close(CORE_message_queue_Control *the_message_queue, Thread_queue_Flush_callout remote_extract_callout, uint32_t status)
Close a message queue.
Definition: coremsgclose.c:24
RTEMS_INLINE_ROUTINE Chain_Node * _Chain_Get_unprotected(Chain_Control *the_chain)
Get the first node (unprotected).
Definition: chainimpl.h:695
RTEMS_INLINE_ROUTINE CORE_message_queue_Buffer_control * _CORE_message_queue_Get_pending_message(CORE_message_queue_Control *the_message_queue)
This function removes the first message from the_message_queue and returns a pointer to it...
Definition: coremsgimpl.h:508
This structure defines the Thread Control Block (TCB).
Definition: thread.h:671
RTEMS_INLINE_ROUTINE bool _CORE_message_queue_Is_priority(CORE_message_queue_Attributes *the_attribute)
This function returns true if the priority attribute is enabled in the attribute_set and false otherw...
Definition: coremsgimpl.h:520
#define CORE_MESSAGE_QUEUE_URGENT_REQUEST
Used when prepending messages onto a message queue.
Definition: coremsgimpl.h:53
This value indicates that there are too many messages pending.
Definition: coremsgimpl.h:79
CORE_message_queue_Disciplines discipline
This field specifies the order in which blocking tasks will be ordered.
Definition: coremsg.h:120
This value indicates that the message was too large for this queue.
Definition: coremsgimpl.h:77
Constants and Structures Associated with the Manipulation of Objects.
This value indicates the operation completed sucessfully.
Definition: coremsgimpl.h:75
Chain_Control Pending_messages
This chain is the set of pending messages.
Definition: coremsg.h:163
RTEMS_INLINE_ROUTINE void _CORE_message_queue_Set_message_priority(CORE_message_queue_Buffer_control *the_message, int priority)
This function sets the priority of the_message.
Definition: coremsgimpl.h:493
#define CORE_MESSAGE_QUEUE_SEND_REQUEST
Used when appending messages onto a message queue.
Definition: coremsgimpl.h:45
This value indicates that the message queue being blocked upon was deleted while the thread was waiti...
Definition: coremsgimpl.h:87
uint32_t Watchdog_Interval
Type is used to specify the length of intervals.
Definition: watchdog.h:47
bool _CORE_message_queue_Initialize(CORE_message_queue_Control *the_message_queue, CORE_message_queue_Attributes *the_message_queue_attributes, 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:140
RTEMS_INLINE_ROUTINE void _CORE_message_queue_Copy_buffer(const void *source, void *destination, size_t size)
This routine copies the contents of the source message buffer to the destination message buffer...
Definition: coremsgimpl.h:436
This value indicates that blocking tasks are in priority order.
Definition: coremsg.h:109
void _CORE_message_queue_Seize(CORE_message_queue_Control *the_message_queue, Thread_Control *executing, Objects_Id id, void *buffer, size_t *size_p, bool wait, Watchdog_Interval timeout, ISR_lock_Context *lock_context)
Size a message from the message queue.
Definition: coremsgseize.c:29
Local ISR lock context for acquire and release pairs.
Definition: isrlock.h:65
RTEMS_INLINE_ROUTINE Thread_Control * _Thread_queue_First_locked(Thread_queue_Control *the_thread_queue)
Returns the first thread on the thread queue if it exists, otherwise NULL.
Definition: threadqimpl.h:293
uint32_t Objects_Id
The following type defines the control block used to manage object IDs.
Definition: object.h:122
void _CORE_message_queue_Insert_message(CORE_message_queue_Control *the_message_queue, CORE_message_queue_Buffer_control *the_message, CORE_message_queue_Submit_types submit_type)
Insert a message into the message queue.
Definition: coremsginsert.c:40
Thread_Wait_information Wait
This field is the blocking information for this thread.
Definition: thread.h:715
void(* Thread_queue_Flush_callout)(Thread_Control *)
The following type defines the callout used when a remote task is extracted from a local thread queue...
Definition: threadqimpl.h:65
Thread_queue_Control Wait_queue
This field is the Waiting Queue used to manage the set of tasks which are blocked waiting to receive ...
Definition: coremsg.h:144
RTEMS_INLINE_ROUTINE CORE_message_queue_Buffer_control * _CORE_message_queue_Allocate_message_buffer(CORE_message_queue_Control *the_message_queue)
This function allocates a message buffer from the inactive message buffer chain.
Definition: coremsgimpl.h:450