Skip to content
Snippets Groups Projects
Commit 21c97b16 authored by Gregory Nutt's avatar Gregory Nutt
Browse files

Revert "sem_wait.c edited online with Bitbucket. Fix some correct but useless code."

What was I thinking?  I missed that litle minus sign and the possibility that the errno might be some positive non-zero value.

This reverts commit 43880878.
parent 43880878
No related branches found
No related tags found
No related merge requests found
......@@ -187,7 +187,7 @@ int nxsem_wait(FAR sem_t *sem)
* race conditions.
*/
/* An error may have occurred while we were sleeping. Expected
/* Check if an error occurred while we were sleeping. Expected
* errors include EINTR meaning that we were awakened by a signal
* or ETIMEDOUT meaning that the timer expired for the case of
* sem_timedwait().
......@@ -197,7 +197,7 @@ int nxsem_wait(FAR sem_t *sem)
* thread was restarted.
*/
ret = rtcb->pterrno;
ret = rtcb->pterrno != OK ? -rtcb->pterrno : OK;
rtcb->pterrno = saved_errno;
#ifdef CONFIG_PRIORITY_INHERITANCE
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment