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/27 15:42:41 UTC

[GitHub] [incubator-nuttx] pkarashchenko commented on a diff in pull request #6338: sched/semaphore: sem_wait should not report ECANCELED

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


##########
sched/semaphore/sem_wait.c:
##########
@@ -251,37 +251,21 @@ int nxsem_wait_uninterruptible(FAR sem_t *sem)
 
 int sem_wait(FAR sem_t *sem)
 {
-  int errcode;
   int ret;
 
   /* sem_wait() is a cancellation point */
 
-  if (enter_cancellation_point())
-    {
-#ifdef CONFIG_CANCELLATION_POINTS
-      /* If there is a pending cancellation, then do not perform
-       * the wait.  Exit now with ECANCELED.
-       */
-
-      errcode = ECANCELED;
-      goto errout_with_cancelpt;
-#endif
-    }

Review Comment:
   For now this is the only place. But I can add a check in others



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