diff options
author | Joel Sherrill <joel.sherrill@OARcorp.com> | 2001-08-16 19:30:59 +0000 |
---|---|---|
committer | Joel Sherrill <joel.sherrill@OARcorp.com> | 2001-08-16 19:30:59 +0000 |
commit | aed5ae00ee716fb8179df60a0b205fc975e99241 (patch) | |
tree | cc541a8befb8c30c3bbcba68d5fc68c97eb83245 /cpukit | |
parent | 2001-08-16 Joel Sherrill <joel@OARcorp.com> (diff) | |
download | rtems-aed5ae00ee716fb8179df60a0b205fc975e99241.tar.bz2 |
2001-08-16 Joel Sherrill <joel@OARcorp.com>
* src/mqueuesendsupp.c: Account for possibly blocking during the
core send operation.
Diffstat (limited to 'cpukit')
-rw-r--r-- | cpukit/posix/src/mqueuesendsupp.c | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/cpukit/posix/src/mqueuesendsupp.c b/cpukit/posix/src/mqueuesendsupp.c index aaae7163f8..c698cde44c 100644 --- a/cpukit/posix/src/mqueuesendsupp.c +++ b/cpukit/posix/src/mqueuesendsupp.c @@ -91,8 +91,19 @@ int _POSIX_Message_queue_Send_support( ); _Thread_Enable_dispatch(); + + /* + * If we had to block, then this is where the task returns + * after it wakes up. The returned status is correct for + * non-blocking operations but if we blocked, then we need + * to look at the status in our TCB. + */ + + if ( msg_status == CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED_WAIT ) + msg_status = _Thread_Executing->Wait.return_code; + if ( !msg_status ) - return 0; + return msg_status; set_errno_and_return_minus_one( _POSIX_Message_queue_Translate_core_message_queue_return_code( |