path: root/sys/sys/watchdog.h
diff options
authorMike Karels <karels@FreeBSD.org>2018-01-03 00:56:30 +0000
committerMike Karels <karels@FreeBSD.org>2018-01-03 00:56:30 +0000
commitd626b50b9db1f1fea4d0bf3668a05f8198fe83dd (patch)
treeb9fd9c0fe54ca6c9c718b074f688b2759717bc16 /sys/sys/watchdog.h
parentf68e716ffe4b6edcb66df7e6e44ad8bde817417b (diff)
make SW_WATCHDOG dynamic
Enable the hardclock-based watchdog previously conditional on the SW_WATCHDOG option whenever hardware watchdogs are not found, and watchdogd attempts to enable the watchdog. The SW_WATCHDOG option still causes the sofware watchdog to be enabled even if there is a hardware watchdog. This does not change the other software-based watchdog enabled by the --softtimeout option to watchdogd. Note that the code to reprime the watchdog during kernel core dumps is no longer conditional on SW_WATCHDOG. I think this was previously a bug. Reviewed by: imp alfred bjk MFC after: 1 week Relnotes: yes Differential Revision: https://reviews.freebsd.org/D13713
Notes: svn path=/head/; revision=327505
Diffstat (limited to 'sys/sys/watchdog.h')
1 files changed, 8 insertions, 0 deletions
diff --git a/sys/sys/watchdog.h b/sys/sys/watchdog.h
index 1b85ce7a83ed..191456a4acf2 100644
--- a/sys/sys/watchdog.h
+++ b/sys/sys/watchdog.h
@@ -112,6 +112,14 @@ EVENTHANDLER_DECLARE(watchdog_list, watchdog_fn);
u_int wdog_kern_last_timeout(void);
int wdog_kern_pat(u_int utim);
+ * The following function pointer is used to attach a software watchdog
+ * if no hardware watchdog has been attached, and if the software module
+ * has initialized the function pointer.
+ */
+extern void (*wdog_software_attach)(void);
#endif /* _SYS_WATCHDOG_H */