mirror of
https://gitlab.rtems.org/rtems/rtos/rtems.git
synced 2026-09-21 22:44:02 +08:00
score: _CORE_message_queue_Set_message_priority()
Remove _CORE_message_queue_Set_message_priority() and set the priority in _CORE_message_queue_Insert_message().
This commit is contained in:
@@ -579,22 +579,6 @@ RTEMS_INLINE_ROUTINE int _CORE_message_queue_Get_message_priority (
|
||||
#endif
|
||||
}
|
||||
|
||||
/**
|
||||
* This function sets the priority of @a the_message.
|
||||
*
|
||||
* @note It encapsulates the optional behavior that message priority is
|
||||
* disabled if no API requires it.
|
||||
*/
|
||||
RTEMS_INLINE_ROUTINE void _CORE_message_queue_Set_message_priority (
|
||||
CORE_message_queue_Buffer_control *the_message,
|
||||
int priority
|
||||
)
|
||||
{
|
||||
#if defined(RTEMS_SCORE_COREMSG_ENABLE_MESSAGE_PRIORITY)
|
||||
the_message->priority = priority;
|
||||
#endif
|
||||
}
|
||||
|
||||
/**
|
||||
* This function removes the first message from the_message_queue
|
||||
* and returns a pointer to it.
|
||||
|
||||
@@ -48,7 +48,10 @@ void _CORE_message_queue_Insert_message(
|
||||
bool notify;
|
||||
#endif
|
||||
|
||||
_CORE_message_queue_Set_message_priority( the_message, submit_type );
|
||||
#if defined(RTEMS_SCORE_COREMSG_ENABLE_MESSAGE_PRIORITY)
|
||||
the_message->priority = submit_type;
|
||||
#endif
|
||||
|
||||
pending_messages = &the_message_queue->Pending_messages;
|
||||
|
||||
#if defined(RTEMS_SCORE_COREMSG_ENABLE_NOTIFICATION)
|
||||
|
||||
@@ -90,21 +90,16 @@ void _CORE_message_queue_Seize(
|
||||
* puts the messages in the message queue on behalf of the
|
||||
* waiting task.
|
||||
*/
|
||||
_CORE_message_queue_Set_message_priority(
|
||||
the_message,
|
||||
the_thread->Wait.count
|
||||
);
|
||||
the_message->Contents.size = (size_t) the_thread->Wait.option;
|
||||
_CORE_message_queue_Copy_buffer(
|
||||
the_thread->Wait.return_argument_second.immutable_object,
|
||||
the_message->Contents.buffer,
|
||||
the_message->Contents.size
|
||||
);
|
||||
|
||||
_CORE_message_queue_Insert_message(
|
||||
the_message_queue,
|
||||
the_message,
|
||||
_CORE_message_queue_Get_message_priority( the_message )
|
||||
the_message_queue,
|
||||
the_message,
|
||||
the_thread->Wait.count
|
||||
);
|
||||
_Thread_queue_Extract_critical(
|
||||
&the_message_queue->Wait_queue.Queue,
|
||||
|
||||
@@ -73,13 +73,11 @@ CORE_message_queue_Status _CORE_message_queue_Do_submit(
|
||||
_CORE_message_queue_Allocate_message_buffer( the_message_queue );
|
||||
if ( the_message ) {
|
||||
the_message->Contents.size = size;
|
||||
_CORE_message_queue_Set_message_priority( the_message, submit_type );
|
||||
_CORE_message_queue_Copy_buffer(
|
||||
buffer,
|
||||
the_message->Contents.buffer,
|
||||
size
|
||||
);
|
||||
|
||||
_CORE_message_queue_Insert_message(
|
||||
the_message_queue,
|
||||
the_message,
|
||||
|
||||
Reference in New Issue
Block a user