forked from Imagelibrary/rtems
2001-08-16 Joel Sherrill <joel@OARcorp.com>
* src/mqueuesendsupp.c: Account for possibly blocking during the core send operation.
This commit is contained in:
@@ -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(
|
||||
|
||||
@@ -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(
|
||||
|
||||
Reference in New Issue
Block a user