xref: /qemu/include/system/watchdog.h (revision 9af2398977a78d37bf184d6ff6bd04c72bfbf006)
19dd986ccSRichard W.M. Jones /*
29dd986ccSRichard W.M. Jones  * Virtual hardware watchdog.
39dd986ccSRichard W.M. Jones  *
49dd986ccSRichard W.M. Jones  * Copyright (C) 2009 Red Hat Inc.
59dd986ccSRichard W.M. Jones  *
69dd986ccSRichard W.M. Jones  * This program is free software; you can redistribute it and/or
79dd986ccSRichard W.M. Jones  * modify it under the terms of the GNU General Public License
89dd986ccSRichard W.M. Jones  * as published by the Free Software Foundation; either version 2
99dd986ccSRichard W.M. Jones  * of the License, or (at your option) any later version.
109dd986ccSRichard W.M. Jones  *
119dd986ccSRichard W.M. Jones  * This program is distributed in the hope that it will be useful,
129dd986ccSRichard W.M. Jones  * but WITHOUT ANY WARRANTY; without even the implied warranty of
139dd986ccSRichard W.M. Jones  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
149dd986ccSRichard W.M. Jones  * GNU General Public License for more details.
159dd986ccSRichard W.M. Jones  *
169dd986ccSRichard W.M. Jones  * You should have received a copy of the GNU General Public License
178167ee88SBlue Swirl  * along with this program; if not, see <http://www.gnu.org/licenses/>.
189dd986ccSRichard W.M. Jones  *
199dd986ccSRichard W.M. Jones  * By Richard W.M. Jones (rjones@redhat.com).
209dd986ccSRichard W.M. Jones  */
219dd986ccSRichard W.M. Jones 
229dd986ccSRichard W.M. Jones #ifndef QEMU_WATCHDOG_H
239dd986ccSRichard W.M. Jones #define QEMU_WATCHDOG_H
249dd986ccSRichard W.M. Jones 
251de7afc9SPaolo Bonzini #include "qemu/queue.h"
26*9af23989SMarkus Armbruster #include "qapi/qapi-types-run-state.h"
270d035b6cSBo Tu 
289dd986ccSRichard W.M. Jones struct WatchdogTimerModel {
2972cf2d4fSBlue Swirl     QLIST_ENTRY(WatchdogTimerModel) entry;
309dd986ccSRichard W.M. Jones 
319dd986ccSRichard W.M. Jones     /* Short name of the device - used to select it on the command line. */
329dd986ccSRichard W.M. Jones     const char *wdt_name;
339dd986ccSRichard W.M. Jones     /* Longer description (eg. manufacturer and full model number). */
349dd986ccSRichard W.M. Jones     const char *wdt_description;
359dd986ccSRichard W.M. Jones };
369dd986ccSRichard W.M. Jones typedef struct WatchdogTimerModel WatchdogTimerModel;
379dd986ccSRichard W.M. Jones 
389dd986ccSRichard W.M. Jones /* in hw/watchdog.c */
3964b85a8fSBlue Swirl int select_watchdog(const char *p);
4064b85a8fSBlue Swirl int select_watchdog_action(const char *action);
414c7f4426SMichal Privoznik WatchdogAction get_watchdog_action(void);
4264b85a8fSBlue Swirl void watchdog_add_model(WatchdogTimerModel *model);
4364b85a8fSBlue Swirl void watchdog_perform_action(void);
449dd986ccSRichard W.M. Jones 
459dd986ccSRichard W.M. Jones #endif /* QEMU_WATCHDOG_H */
46