anchao commented on code in PR #17556:
URL: https://github.com/apache/nuttx/pull/17556#discussion_r2630224889


##########
sched/wdog/wd_cancel.c:
##########
@@ -61,32 +61,37 @@
 int wd_cancel(FAR struct wdog_s *wdog)
 {
   irqstate_t flags;
-  bool head;
+  int ret   = -EINVAL;
+  bool head = false;
 
-  flags = spin_lock_irqsave(&g_wdspinlock);
+  if (wdog != NULL)
+    {
+      sched_note_wdog(NOTE_WDOG_CANCEL, (FAR void *)wdog->func,

Review Comment:
   This PR contains many of redundant modifications unrelated to hrtimers. In 
particular, the optimizations for the clock subsystem need to be separated and 
merged independently. From the perspective of hrtimer implementation details, I 
do not observe any significant differences; instead, your commits include 
extensive code for ticks/counter conversion.
   I recommend merging #17517 first, as this implementation serves as an 
optional hrtimer configuration for the system and does not alter the underlying 
clock system implementation. If your implementation is deemed superior, 
optimizations can be developed based on #17517
   



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