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


##########
drivers/timers/watchdog.c:
##########
@@ -466,12 +510,266 @@ static int wdog_notifier(FAR struct notifier_block *nb, 
unsigned long action,
 }
 #endif
 
-static void wdog_callback(wdparm_t arg)
+#ifdef CONFIG_WATCHDOG_TASKMONITOR
+/* Restart the timeout of a channel, if it is armed */
+
+static void watchdog_taskmonitor_feed(FAR struct watchdog_user_s *user)
+{
+  if (user->armed)
+    {
+      user->deadline = clock_systime_ticks() + user->timeout;
+    }
+}
+
+/* Feed the lower half while no armed channel timed out.  Running from the
+ * low priority work queue also makes the hardware reset the system if that
+ * queue stops.

Review Comment:
   but can we use the different trigger method(e.g. wdog/wqueue/idle thred)?



##########
drivers/timers/watchdog.c:
##########
@@ -466,12 +510,266 @@ static int wdog_notifier(FAR struct notifier_block *nb, 
unsigned long action,
 }
 #endif
 
-static void wdog_callback(wdparm_t arg)
+#ifdef CONFIG_WATCHDOG_TASKMONITOR
+/* Restart the timeout of a channel, if it is armed */
+
+static void watchdog_taskmonitor_feed(FAR struct watchdog_user_s *user)
+{
+  if (user->armed)
+    {
+      user->deadline = clock_systime_ticks() + user->timeout;
+    }
+}
+
+/* Feed the lower half while no armed channel timed out.  Running from the
+ * low priority work queue also makes the hardware reset the system if that
+ * queue stops.

Review Comment:
   but can we use the different trigger method(e.g. wdog/wqueue/idle thread)?



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