summaryrefslogtreecommitdiffstats
path: root/cpukit
diff options
context:
space:
mode:
authorJoel Sherrill <joel.sherrill@OARcorp.com>2001-08-09 20:48:20 +0000
committerJoel Sherrill <joel.sherrill@OARcorp.com>2001-08-09 20:48:20 +0000
commita781bbffb4eed9d66c3c5defc4fd626d42b745b1 (patch)
treed077ba0cd6f98e92d7b9068504a32f764aa0631f /cpukit
parent33c31af7c83ed131e959d099a12cf6926b840f9f (diff)
downloadrtems-a781bbffb4eed9d66c3c5defc4fd626d42b745b1.tar.bz2
2001-08-09 Joel Sherrill <joel@OARcorp.com>
* src/mqueuesendsupp.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 '')
-rw-r--r--cpukit/posix/ChangeLog7
-rw-r--r--cpukit/posix/src/mqueuesendsupp.c7
2 files changed, 11 insertions, 3 deletions
diff --git a/cpukit/posix/ChangeLog b/cpukit/posix/ChangeLog
index 878b718d68..0a899d79fc 100644
--- a/cpukit/posix/ChangeLog
+++ b/cpukit/posix/ChangeLog
@@ -1,3 +1,10 @@
+2001-08-09 Joel Sherrill <joel@OARcorp.com>
+
+ * src/mqueuesendsupp.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>.
+
2000-05-24 Fernando Ruiz Casas <fernando.ruiz@ctv.es>
* src/getegid.c, src/geteuid.c, src/getgid.c, src/getlogin.c,
diff --git a/cpukit/posix/src/mqueuesendsupp.c b/cpukit/posix/src/mqueuesendsupp.c
index efa0545125..aaae7163f8 100644
--- a/cpukit/posix/src/mqueuesendsupp.c
+++ b/cpukit/posix/src/mqueuesendsupp.c
@@ -48,6 +48,7 @@ int _POSIX_Message_queue_Send_support(
{
register POSIX_Message_queue_Control *the_mq;
Objects_Locations location;
+ CORE_message_queue_Status msg_status;
/*
* Validate the priority.
@@ -74,7 +75,7 @@ int _POSIX_Message_queue_Send_support(
set_errno_and_return_minus_one( EBADF );
}
- _CORE_message_queue_Submit(
+ msg_status = _CORE_message_queue_Submit(
&the_mq->Message_queue,
(void *) msg_ptr,
msg_len,
@@ -90,12 +91,12 @@ int _POSIX_Message_queue_Send_support(
);
_Thread_Enable_dispatch();
- if ( !_Thread_Executing->Wait.return_code )
+ if ( !msg_status )
return 0;
set_errno_and_return_minus_one(
_POSIX_Message_queue_Translate_core_message_queue_return_code(
- _Thread_Executing->Wait.return_code
+ msg_status
)
);
}