This source file includes following definitions.
- pretimeout_panic
- watchdog_gov_panic_register
- watchdog_gov_panic_unregister
1
2
3
4
5
6 #include <linux/kernel.h>
7 #include <linux/module.h>
8 #include <linux/watchdog.h>
9
10 #include "watchdog_pretimeout.h"
11
12
13
14
15
16
17
18 static void pretimeout_panic(struct watchdog_device *wdd)
19 {
20 panic("watchdog pretimeout event\n");
21 }
22
23 static struct watchdog_governor watchdog_gov_panic = {
24 .name = "panic",
25 .pretimeout = pretimeout_panic,
26 };
27
28 static int __init watchdog_gov_panic_register(void)
29 {
30 return watchdog_register_governor(&watchdog_gov_panic);
31 }
32
33 static void __exit watchdog_gov_panic_unregister(void)
34 {
35 watchdog_unregister_governor(&watchdog_gov_panic);
36 }
37 module_init(watchdog_gov_panic_register);
38 module_exit(watchdog_gov_panic_unregister);
39
40 MODULE_AUTHOR("Vladimir Zapolskiy <vladimir_zapolskiy@mentor.com>");
41 MODULE_DESCRIPTION("Panic watchdog pretimeout governor");
42 MODULE_LICENSE("GPL");