mirror of
https://gitlab.rtems.org/rtems/rtos/rtems.git
synced 2025-12-05 23:23:13 +00:00
2001-08-09 Joel Sherrill <joel@OARcorp.com>
* src/msgqsubmit.c: Unblocking message queue operations should NOT use _Thread_Executing for return status since it is permissible to invoke message send operations from an ISR. This was reported by Suvrat Gupta <suvrat@utstar.com>.
This commit is contained in:
@@ -1,3 +1,10 @@
|
|||||||
|
2001-08-09 Joel Sherrill <joel@OARcorp.com>
|
||||||
|
|
||||||
|
* src/msgqsubmit.c: Unblocking message queue operations should
|
||||||
|
NOT use _Thread_Executing for return status since it is permissible
|
||||||
|
to invoke message send operations from an ISR. This was reported
|
||||||
|
by Suvrat Gupta <suvrat@utstar.com>.
|
||||||
|
|
||||||
2001-03-26 Zoltan Kocsi <zoltan@bendor.com.au>
|
2001-03-26 Zoltan Kocsi <zoltan@bendor.com.au>
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -67,6 +67,7 @@ rtems_status_code _Message_queue_Submit(
|
|||||||
{
|
{
|
||||||
register Message_queue_Control *the_message_queue;
|
register Message_queue_Control *the_message_queue;
|
||||||
Objects_Locations location;
|
Objects_Locations location;
|
||||||
|
CORE_message_queue_Status msg_status;
|
||||||
|
|
||||||
the_message_queue = _Message_queue_Get( id, &location );
|
the_message_queue = _Message_queue_Get( id, &location );
|
||||||
switch ( location )
|
switch ( location )
|
||||||
@@ -103,7 +104,7 @@ rtems_status_code _Message_queue_Submit(
|
|||||||
case OBJECTS_LOCAL:
|
case OBJECTS_LOCAL:
|
||||||
switch ( submit_type ) {
|
switch ( submit_type ) {
|
||||||
case MESSAGE_QUEUE_SEND_REQUEST:
|
case MESSAGE_QUEUE_SEND_REQUEST:
|
||||||
_CORE_message_queue_Send(
|
msg_status = _CORE_message_queue_Send(
|
||||||
&the_message_queue->message_queue,
|
&the_message_queue->message_queue,
|
||||||
buffer,
|
buffer,
|
||||||
size,
|
size,
|
||||||
@@ -114,7 +115,7 @@ rtems_status_code _Message_queue_Submit(
|
|||||||
);
|
);
|
||||||
break;
|
break;
|
||||||
case MESSAGE_QUEUE_URGENT_REQUEST:
|
case MESSAGE_QUEUE_URGENT_REQUEST:
|
||||||
_CORE_message_queue_Urgent(
|
msg_status = _CORE_message_queue_Urgent(
|
||||||
&the_message_queue->message_queue,
|
&the_message_queue->message_queue,
|
||||||
buffer,
|
buffer,
|
||||||
size,
|
size,
|
||||||
@@ -129,9 +130,8 @@ rtems_status_code _Message_queue_Submit(
|
|||||||
}
|
}
|
||||||
|
|
||||||
_Thread_Enable_dispatch();
|
_Thread_Enable_dispatch();
|
||||||
return _Message_queue_Translate_core_message_queue_return_code(
|
return
|
||||||
_Thread_Executing->Wait.return_code
|
_Message_queue_Translate_core_message_queue_return_code( msg_status );
|
||||||
);
|
|
||||||
|
|
||||||
}
|
}
|
||||||
return RTEMS_INTERNAL_ERROR; /* unreached - only to remove warnings */
|
return RTEMS_INTERNAL_ERROR; /* unreached - only to remove warnings */
|
||||||
|
|||||||
@@ -1,3 +1,10 @@
|
|||||||
|
2001-08-09 Joel Sherrill <joel@OARcorp.com>
|
||||||
|
|
||||||
|
* src/msgqsubmit.c: Unblocking message queue operations should
|
||||||
|
NOT use _Thread_Executing for return status since it is permissible
|
||||||
|
to invoke message send operations from an ISR. This was reported
|
||||||
|
by Suvrat Gupta <suvrat@utstar.com>.
|
||||||
|
|
||||||
2001-03-26 Zoltan Kocsi <zoltan@bendor.com.au>
|
2001-03-26 Zoltan Kocsi <zoltan@bendor.com.au>
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -67,6 +67,7 @@ rtems_status_code _Message_queue_Submit(
|
|||||||
{
|
{
|
||||||
register Message_queue_Control *the_message_queue;
|
register Message_queue_Control *the_message_queue;
|
||||||
Objects_Locations location;
|
Objects_Locations location;
|
||||||
|
CORE_message_queue_Status msg_status;
|
||||||
|
|
||||||
the_message_queue = _Message_queue_Get( id, &location );
|
the_message_queue = _Message_queue_Get( id, &location );
|
||||||
switch ( location )
|
switch ( location )
|
||||||
@@ -103,7 +104,7 @@ rtems_status_code _Message_queue_Submit(
|
|||||||
case OBJECTS_LOCAL:
|
case OBJECTS_LOCAL:
|
||||||
switch ( submit_type ) {
|
switch ( submit_type ) {
|
||||||
case MESSAGE_QUEUE_SEND_REQUEST:
|
case MESSAGE_QUEUE_SEND_REQUEST:
|
||||||
_CORE_message_queue_Send(
|
msg_status = _CORE_message_queue_Send(
|
||||||
&the_message_queue->message_queue,
|
&the_message_queue->message_queue,
|
||||||
buffer,
|
buffer,
|
||||||
size,
|
size,
|
||||||
@@ -114,7 +115,7 @@ rtems_status_code _Message_queue_Submit(
|
|||||||
);
|
);
|
||||||
break;
|
break;
|
||||||
case MESSAGE_QUEUE_URGENT_REQUEST:
|
case MESSAGE_QUEUE_URGENT_REQUEST:
|
||||||
_CORE_message_queue_Urgent(
|
msg_status = _CORE_message_queue_Urgent(
|
||||||
&the_message_queue->message_queue,
|
&the_message_queue->message_queue,
|
||||||
buffer,
|
buffer,
|
||||||
size,
|
size,
|
||||||
@@ -129,9 +130,8 @@ rtems_status_code _Message_queue_Submit(
|
|||||||
}
|
}
|
||||||
|
|
||||||
_Thread_Enable_dispatch();
|
_Thread_Enable_dispatch();
|
||||||
return _Message_queue_Translate_core_message_queue_return_code(
|
return
|
||||||
_Thread_Executing->Wait.return_code
|
_Message_queue_Translate_core_message_queue_return_code( msg_status );
|
||||||
);
|
|
||||||
|
|
||||||
}
|
}
|
||||||
return RTEMS_INTERNAL_ERROR; /* unreached - only to remove warnings */
|
return RTEMS_INTERNAL_ERROR; /* unreached - only to remove warnings */
|
||||||
|
|||||||
Reference in New Issue
Block a user