hujun260 commented on code in PR #18199:
URL: https://github.com/apache/nuttx/pull/18199#discussion_r2734528469
##########
sched/semaphore/sem_clockwait.c:
##########
@@ -137,14 +137,14 @@ int nxsem_clockwait(FAR sem_t *sem, clockid_t clockid,
ret = nxsem_wait(sem);
+ leave_critical_section(flags);
Review Comment:
There is no need to place wd_cancel inside the critical section.
1 The watchdog is bound to the current TCB; we don't have to worry about
other tasks modifying the watchdog (e.g., by calling wd_start) after we leave
the critical section.
2 Even if a watchdog timer interrupt occurs after we leave the critical
section, this logic is handled correctly in the nxsem_timeout function.
--
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]