pkarashchenko commented on a change in pull request #4953:
URL: https://github.com/apache/incubator-nuttx/pull/4953#discussion_r767184483



##########
File path: sched/semaphore/sem_tickwait.c
##########
@@ -125,8 +131,21 @@ int nxsem_tickwait(FAR sem_t *sem, clock_t start, uint32_t 
delay)
 
   wd_cancel(&rtcb->waitdog);
 
-out:
+  if (ret < 0)
+    {
+      goto errout_with_irqdisabled;
+    }
+
+  /* We can now restore interrupts */
+
+  /* Success exits */
+
+success_with_irqdisabled:
+
+  /* Error exits */
 
+errout_with_irqdisabled:

Review comment:
       What is the benefit of this vs single `out:`?

##########
File path: sched/semaphore/sem_clockwait.c
##########
@@ -173,7 +179,11 @@ int nxsem_clockwait(FAR sem_t *sem, clockid_t clockid,
 
   wd_cancel(&rtcb->waitdog);
 
-out:
+  /* We can now restore interrupts and delete the watchdog */
+
+success_with_irqdisabled:
+errout_with_irqdisabled:

Review comment:
       What is the benefit of this vs single `out:`?




-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to