watchdog_set...hw_keepalive(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– NAME πŸ’–

watchdog_set_last_hw_keepalive β€” okay so this one sets the last HW keepalive time for a watchdog, bestie ✨ (yes it's a whole mouthful, we love her anyway)


πŸŽ€ SYNOPSIS πŸŽ€

int watchdog_set_last_hw_keepalive (struct watchdog_device *wdd ,
unsigned int last_ping_ms );

🌸 ARGUMENTS 🌸

  • wdd β€” the watchdog device itself, like the actual struct, the main character πŸ‘‘
  • last_ping_ms β€” time since last HW heartbeat ⏱️ so basically "how long ago did this thing last get a lil ping"

πŸ¦‹ DESCRIPTION πŸ¦‹

So this function adjusts the last known HW keepalive time for a watchdog timer, no cap. Why do you even need it?? Okay so picture this: the watchdog is already running by the time the probe function gets called, and it literally can't be pinged immediately 😭 β€” that's the exact situation this exists for.

Two things you gotta know, and I'm being so serious rn:

This function must be called immediately after watchdog registration, and min_hw_heartbeat_ms must be set for this to be useful. Like, both of those. Periodt. πŸ’…

⭐ RETURN ⭐

0 if successful, error otherwise. That's it, that's the vibe check πŸ™ˆ (zero equals slay, anything else equals not slay)


🌈 SEE ALSO 🌈

Kernel file ./drivers/watchdog/watchdog_dev.c, plus the whole friend group:


okay that's the whole page, you ate that 🫢 this iconic lil doc lives in ./drivers/watchdog and it's dated October 2026 β€” mwah, go ping something πŸ’œπŸ§š

πŸ“¦ where this page comes from