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:
Joel Sherrill
2001-08-16 19:30:59 +00:00
parent bfe5d15ef1
commit aed5ae00ee
2 changed files with 24 additions and 2 deletions

View File

@@ -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(

View File

@@ -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(