diff options
author | Joel Sherrill <joel.sherrill@OARcorp.com> | 2001-08-09 20:48:20 +0000 |
---|---|---|
committer | Joel Sherrill <joel.sherrill@OARcorp.com> | 2001-08-09 20:48:20 +0000 |
commit | a781bbffb4eed9d66c3c5defc4fd626d42b745b1 (patch) | |
tree | d077ba0cd6f98e92d7b9068504a32f764aa0631f /c | |
parent | 2001-08-09 Joel Sherrill <joel@OARcorp.com> (diff) | |
download | rtems-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 'c')
-rw-r--r-- | c/src/exec/posix/ChangeLog | 7 | ||||
-rw-r--r-- | c/src/exec/posix/src/mqueuesendsupp.c | 7 |
2 files changed, 11 insertions, 3 deletions
diff --git a/c/src/exec/posix/ChangeLog b/c/src/exec/posix/ChangeLog index 878b718d68..0a899d79fc 100644 --- a/c/src/exec/posix/ChangeLog +++ b/c/src/exec/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/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 ) ); } |