OpenBSD manual page server

Manual Page Search Parameters

WDOG_REGISTER(9) Kernel Developer's Manual WDOG_REGISTER(9)

wdog_registerkernel watchdog interface

#include <sys/systm.h>

void
wdog_register(int (*cb)(void *cb_arg, int period), void *cb_arg);

The kernel watchdog interface is used by hardware watchdog drivers and should be used for all future drivers.

() is called by the hardware driver after configuring the hardware watchdog device. The cb_arg argument is a pointer to the hardware device control structure. The cb argument is a pointer to a function supplied by the driver which sets the timeout in the hardware device.

The cb_arg parameter given to cb is a pointer to the device control structure. The period parameter supplies the desired timeout value in seconds. A period value of zero disables the watchdog. Setting the timeout to a nonzero value after disabling the watchdog will update the timeout value and enable the watchdog.

The framework is implemented in the file sys/kern/kern_watchdog.c.

watchdog(4), sysctl_int(9), timeout(9)

The watchdog timer framework was written by Markus Friedl <markus@openbsd.org> and first appeared in OpenBSD 3.3.

July 17, 2013 OpenBSD-current