WDOG_REGISTER(9)

πŸ“¦ in nixpkgs unstable

✨ 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
  • πŸ’– girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms