mq_receive/send: Return appropriate errnos and stop waiting if signal received.

git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@164 42af7a65-404d-4744-a932-0658087f49c3
This commit is contained in:
patacongo
2007-03-28 14:48:42 +00:00
parent c5971231da
commit 3e352ca10b
9 changed files with 527 additions and 260 deletions
+3 -1
View File
@@ -156,11 +156,13 @@ int sem_wait(sem_t *sem)
/* Add the TCB to the prioritized semaphore wait queue */
*get_errno_ptr() = 0;
up_block_task(rtcb, TSTATE_WAIT_SEM);
/* When we resume at this point, either (1) the semaphore has been
* assigned to this thread of execution, or (2) the semaphore wait
* has been interrupted by a signal.
* has been interrupted by a signal. We can detect the latter case
* be examining the errno value.
*/
if (*get_errno_ptr() != EINTR)