WDOG_REGISTER(9)
β¨ NAME β¨
wdog_register β kernel watchdog interface. Okay bestie, this is the WDOG_REGISTER(9) page from the Kernel Developer's Manual, and it's literally about giving your kernel a watchdog so it doesn't ghost you π
π₯
π SYNOPSIS π
#include <sys/systm.h>
void
wdog_register(int (*cb)(void *cb_arg, int period), void *cb_arg);
π¦ DESCRIPTION π¦
The kernel watchdog interface is used by hardware watchdog drivers, and it should be used for all future drivers. No cap β it's the main character energy for watchdog driver interfaces π
wdog_register() 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. Slay, that's the whole callback situation π
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. Periodt β zero means off, nonzero means back on and updated β¨
πΈ CODE REFERENCES πΈ
The framework is implemented in the file sys/kern/kern_watchdog.c. That's the spot, iykyk π«Ά
π SEE ALSO π
Go read those too, bestie β they're giving related-manpage excellence π
π« HISTORY π«
The watchdog timer framework was written by Markus Friedl <markus@openbsd.org> and first appeared in OpenBSD 3.3. Iconic behavior from 3.3, honestly π
Cute little sign-off: this page is from Debian, dated July 17, 2013, and it's filed under WDOG_REGISTER(9) β bye bestie, don't let your watchdog timeout without updating it πβ¨
π¦ where this page comes from
- nixpkgs unstable: cvs-export
- Copyright (c) 2004 Michael Knudsen <mk@openbsd.org>
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms