From a781bbffb4eed9d66c3c5defc4fd626d42b745b1 Mon Sep 17 00:00:00 2001 From: Joel Sherrill Date: Thu, 9 Aug 2001 20:48:20 +0000 Subject: 2001-08-09 Joel Sherrill * 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 . --- c/src/exec/posix/src/mqueuesendsupp.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'c/src/exec/posix/src') diff --git a/c/src/exec/posix/src/mqueuesendsupp.c b/c/src/exec/posix/src/mqueuesendsupp.c index efa0545125..aaae7163f8 100644 --- a/c/src/exec/posix/src/mqueuesendsupp.c +++ b/c/src/exec/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 ) ); } -- cgit v1.2.3