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


##########
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:
   I'm not sure if you have taken note of the implementation of hrtimers in 
HaloOS. In particular, the core logic of the **hrtimer_queue** component is 
actually similar to that in HaloOS in terms of both naming and implementation:
   
   
https://gitee.com/haloos/vcos_kernel_nuttx/blob/master/sched/hrtimer/hrtimer_queue.h
   
   This naming convention is not commonly adopted—for instance, the Linux 
kernel uses a different naming approach for equivalent functionality:
   
   https://github.com/torvalds/linux/blob/master/include/linux/hrtimer.h
   
   
   Additionally, I noticed your first commit was on December 1st, while  
@wangchdo  commit was earlier, right?
   
   <img width="528" height="285" alt="image" 
src="https://github.com/user-attachments/assets/3eedeeca-ebcd-4d53-8ab1-0834834e5d7e";
 />
   



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