DragonFly On-Line Manual Pages
WDOG(9) DragonFly Kernel Developer's Manual WDOG(9)
NAME
wdog_register, wdog_unregister -- watchdog facility
SYNOPSIS
#include <sys/wdog.h>
typedef int (wdog_fn)(void *, int);
void
wdog_register(struct watchdog *wd);
void
wdog_unregister(struct watchdog *wd);
DESCRIPTION
The wdog_register() and wdog_unregister() functions do just what their
names indicate.
The watchdog driver, such as ichwd(4), initializes a struct watchdog (see
<sys/wdog.h> for details) and passes a pointer to it to wdog_register().
The wdog framework will then periodically call the function pointed to by
the struct's wdog_fn member and passes two arguments: a generic pointer
specified in struct watchdog's arg member and an integer which is the
desired period. In the function, the driver must tickle the watchdog
hardware and return the period, which it can adjust if hardware specifics
require that.
Registered watchdogs should be unregistered with wdog_unregister() upon
driver detachment.
HISTORY
The wdog framework appeared in DragonFly 2.5.
AUTHORS
Alex Hornung
DragonFly 3.5 May 6, 2012 DragonFly 3.5