xiaoxiang781216 commented on code in PR #17640:
URL: https://github.com/apache/nuttx/pull/17640#discussion_r2642727766


##########
sched/wdog/wd_cancel.c:
##########
@@ -61,34 +61,33 @@
 int wd_cancel(FAR struct wdog_s *wdog)
 {
   irqstate_t flags;
-  bool head;
+  bool       reassess = false;
+  int        ret      = -EINVAL;
 
-  flags = spin_lock_irqsave(&g_wdspinlock);
+  flags = enter_critical_section();

Review Comment:
   > @Fix-Point @hujun260 @xiaoxiang781216 let us disscuss here.
   
   spinlock version can't pass stress monkey test with SMP config. The 
reasonable approach is:
   
   1. restore wdog to the critical section version
   2. implement hrtimer without the critical section
   3. switch all wdog in sched folder to hrtimer
   4. implement wdog on top of hrtimer
   
   since the usage of wdog in driver is simple, we may remove the critical 
section after step 3.



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