wdt_set_timeout(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… wdt_set_timeout(9) πŸ’…

okay so real talk, bestie β€” we're deep in the Kernel API Manual today, section 9, and the star of the show is wdt_set_timeout. she sets a new timeout value with a watchdog ioctl. that's her whole job. iconic, honestly. ✨


πŸŽ€ NAME πŸŽ€

wdt_set_timeout β€” set a new timeout value with watchdog ioctl πŸ•


🌸 SYNOPSIS 🌸

int wdt_set_timeout (struct watchdog_device *wdd , unsigned int t );

like… look at her. two args, one int coming back. no cap, she's lowkey elegant. πŸ¦‹


✨ ARGUMENTS ✨

  • wdd β€” pointer to the watchdog_device structure 🫢 like, this is the watchdog device herself, bestie, you gotta hand her over
  • t β€” timeout value in seconds ⏱️ (yes, seconds, not vibes β€” actual seconds)

πŸ’– DESCRIPTION πŸ’–

so the hardware device has an 8 or 16 bit watchdog timer β€” and which one you get depends on the chip version, iykyk πŸ”₯ that timer can be configured to count in seconds or in minutes, and honestly? range. πŸ‘‘

she's used within the WDIOC_SETTIMEOUT watchdog device ioctl. that's the whole context, that's her main character moment. πŸ’…


⭐ RETURN ⭐

  • 0 if the timeout was set successfully πŸŽ‰ slay, we love a zero
  • a negative error code on failure 😭 okay so if you get a negative back, something went wrong, no cap

πŸ¦‹ SEE ALSO πŸ¦‹

Kernel file ./drivers/watchdog/it87_wdt.c β€” go read the source, bestie, it's giving lore πŸ“–βœ¨


πŸŽ€ friendly reminder that this page lives under ./drivers/watchdog, is dated October 2026, and is officially wdt_set_timeout(9) β€” so if you forget where you read this, the manual will absolutely remind you. periodt. πŸ’œπŸ§šβ€β™€οΈπŸŒˆ
πŸ“¦ where this page comes from