summaryrefslogtreecommitdiffstats
path: root/cpukit/rtems
diff options
context:
space:
mode:
authorJoel Sherrill <joel.sherrill@OARcorp.com>2001-08-09 20:48:01 +0000
committerJoel Sherrill <joel.sherrill@OARcorp.com>2001-08-09 20:48:01 +0000
commit33c31af7c83ed131e959d099a12cf6926b840f9f (patch)
treeb7e8aa25c88fe272ff13a5d00cfdc9c8e9c02d5f /cpukit/rtems
parent00815403be55800c8e6c9ecf8464def7179bbc21 (diff)
downloadrtems-33c31af7c83ed131e959d099a12cf6926b840f9f.tar.bz2
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>.
Diffstat (limited to 'cpukit/rtems')
-rw-r--r--cpukit/rtems/ChangeLog7
-rw-r--r--cpukit/rtems/src/msgqsubmit.c10
2 files changed, 12 insertions, 5 deletions
diff --git a/cpukit/rtems/ChangeLog b/cpukit/rtems/ChangeLog
index 45e13897c2..af0a9d8e4d 100644
--- a/cpukit/rtems/ChangeLog
+++ b/cpukit/rtems/ChangeLog
@@ -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>
diff --git a/cpukit/rtems/src/msgqsubmit.c b/cpukit/rtems/src/msgqsubmit.c
index a7139a86ac..c70f3f28aa 100644
--- a/cpukit/rtems/src/msgqsubmit.c
+++ b/cpukit/rtems/src/msgqsubmit.c
@@ -67,6 +67,7 @@ rtems_status_code _Message_queue_Submit(
{
register Message_queue_Control *the_message_queue;
Objects_Locations location;
+ CORE_message_queue_Status msg_status;
the_message_queue = _Message_queue_Get( id, &location );
switch ( location )
@@ -103,7 +104,7 @@ rtems_status_code _Message_queue_Submit(
case OBJECTS_LOCAL:
switch ( submit_type ) {
case MESSAGE_QUEUE_SEND_REQUEST:
- _CORE_message_queue_Send(
+ msg_status = _CORE_message_queue_Send(
&the_message_queue->message_queue,
buffer,
size,
@@ -114,7 +115,7 @@ rtems_status_code _Message_queue_Submit(
);
break;
case MESSAGE_QUEUE_URGENT_REQUEST:
- _CORE_message_queue_Urgent(
+ msg_status = _CORE_message_queue_Urgent(
&the_message_queue->message_queue,
buffer,
size,
@@ -129,9 +130,8 @@ rtems_status_code _Message_queue_Submit(
}
_Thread_Enable_dispatch();
- return _Message_queue_Translate_core_message_queue_return_code(
- _Thread_Executing->Wait.return_code
- );
+ return
+ _Message_queue_Translate_core_message_queue_return_code( msg_status );
}
return RTEMS_INTERNAL_ERROR; /* unreached - only to remove warnings */