You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by GitBox <gi...@apache.org> on 2022/05/14 12:34:08 UTC

[GitHub] [incubator-nuttx] pkarashchenko commented on a diff in pull request #6271: sched: Replace pthread_sem_take with nxsem_wait_uninterruptible

pkarashchenko commented on code in PR #6271:
URL: https://github.com/apache/incubator-nuttx/pull/6271#discussion_r872974974


##########
sched/pthread/pthread_condwait.c:
##########
@@ -107,7 +107,7 @@ int pthread_cond_wait(FAR pthread_cond_t *cond, FAR pthread_mutex_t *mutex)
        * or if the thread is canceled (ECANCELED)
        */
 
-      status = pthread_sem_take((FAR sem_t *)&cond->sem, NULL, false);
+      status = nxsem_wait_uninterruptible(&cond->sem);

Review Comment:
   I agree with all except this change. `pthread_sem_take` returns `-` status of `nxsem_wait_uninterruptible`, so error handling of `pthread_cond_wait` will be changed.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org