aboutsummaryrefslogtreecommitdiff
path: root/sys/sys/watchdog.h
diff options
context:
space:
mode:
authorPoul-Henning Kamp <phk@FreeBSD.org>2004-02-28 20:06:59 +0000
committerPoul-Henning Kamp <phk@FreeBSD.org>2004-02-28 20:06:59 +0000
commit3e2c971172f16c3dbf180df5c63b16ed56ff2cdd (patch)
treef6fc64bd55b4b3efe406ada1c01bbd455a6d33c3 /sys/sys/watchdog.h
parente8577ac876da374dd7eca5c35c41ce9af3d5e307 (diff)
downloadsrc-3e2c971172f16c3dbf180df5c63b16ed56ff2cdd.tar.gz
src-3e2c971172f16c3dbf180df5c63b16ed56ff2cdd.zip
Add a generic watchdog facility which through a single device entry
in /dev controls all available watchdog implementations.
Notes
Notes: svn path=/head/; revision=126370
Diffstat (limited to 'sys/sys/watchdog.h')
-rw-r--r--sys/sys/watchdog.h19
1 files changed, 15 insertions, 4 deletions
diff --git a/sys/sys/watchdog.h b/sys/sys/watchdog.h
index 8cfac00b3e95..a67b68b4392d 100644
--- a/sys/sys/watchdog.h
+++ b/sys/sys/watchdog.h
@@ -30,6 +30,12 @@
#include <sys/ioccom.h>
+#ifdef I_HAVE_TOTALLY_LOST_MY_SENSE_OF_HUMOUR
+#define _PATH_WATCHDOG "watchdog"
+#else
+#define _PATH_WATCHDOG "fido"
+#endif
+
#define WDIOCPATPAT _IOW('W', 42, u_int)
#define WD_ACTIVE 0x8000000
@@ -56,10 +62,6 @@
* NB: Expect variance in the +/- 10-20% range.
*/
-#ifdef _KERNEL
-#define __WD_LEGAL (WD_ACTIVE | WD_PASSIVE | WD_INTERVAL)
-#endif
-
/* Handy macros for humans not used to power of two nanoseconds */
#define WD_TO_NEVER 0
#define WD_TO_1MS 20
@@ -73,4 +75,13 @@
#define WD_TO_16SEC 34
#define WD_TO_32SEC 35
+#ifdef _KERNEL
+
+#include <sys/eventhandler.h>
+
+typedef void (*watchdog_fn)(void *, u_int, int *);
+
+EVENTHANDLER_DECLARE(watchdog_list, watchdog_fn);
+#endif
+
#endif /* _SYS_WATCHDOG_H */