xiaoxiang781216 commented on code in PR #6226:
URL: https://github.com/apache/incubator-nuttx/pull/6226#discussion_r872981750
##########
sched/semaphore/sem_tickwait.c:
##########
@@ -165,19 +145,24 @@ int nxsem_tickwait(FAR sem_t *sem, clock_t start,
uint32_t delay)
*
****************************************************************************/
-int nxsem_tickwait_uninterruptible(FAR sem_t *sem, clock_t start,
- uint32_t delay)
+int nxsem_tickwait_uninterruptible(FAR sem_t *sem, uint32_t delay)
{
- int ret;
+ clock_t end = clock_systime_ticks() + delay;
- do
+ for (; ; )
{
/* Take the semaphore (perhaps waiting) */
- ret = nxsem_tickwait(sem, start, delay);
+ int ret = nxsem_tickwait(sem, delay);
+ if (ret != -EINTR)
+ {
+ return ret;
Review Comment:
Done.
--
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]