daniel-p-carvalho commented on code in PR #20782:
URL: https://github.com/apache/nuttx/pull/20782#discussion_r4372332507
##########
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:
Thanks, that makes sense. Since merging this and reworking it right after
would just churn the Kconfig and the user-visible behavior, I'd rather do the
unification in this PR.
To confirm the direction: if I fold the per-task channels (open/write/ioctl,
deadlines, panic option) into AUTOMONITOR and drop WATCHDOG_TASKMONITOR, should
the per-task supervision always be built with AUTOMONITOR, or behind a
sub-option so systems that only want the global feed do not pay for it? I'd
lean towards the sub-option, default off, so existing AUTOMONITOR users see no
change.
--
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]