__hw_protection_trigger(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… __hw_protection_trigger (a Kernel API Manual moment)

okay bestie, so this one lives in the Kernel API Manual (9 section, kernel-internals vibes ✨) and it's literally the "oh no the hardware is cooking, shut it down" function 🫢

✨ NAME ✨

__hw_protection_trigger β€” trigger an emergency system shutdown or reboot πŸ”₯πŸ’€

🌸 SYNOPSIS 🌸

void __hw_protection_trigger (const char *reason , int ms_until_forced ,
enum hw_protection_action action );

that's the whole signature, no cap β€” void, so it doesn't hand you anything back πŸŽ€

πŸ¦‹ ARGUMENTS πŸ¦‹

  • reason β€” the reason of the emergency shutdown or reboot, and yep it gets printed. so like, say something useful bestie πŸ’–
  • ms_until_forced β€” how long to wait for an orderly shutdown or reboot before triggering it. a negative value disables the forced shutdown or reboot entirely πŸ™ˆ
  • action β€” the hardware protection action to be taken, it's an enum hw_protection_action ⭐

πŸ‘‘ DESCRIPTION πŸ‘‘

so the whole point: you initiate an emergency system shutdown or reboot to protect the hardware from further damage πŸ’… iconic protective behavior. usage examples include a thermal protection β€” i.e. things are getting toasty and we're bailing 🌑️πŸ”₯

πŸ’€ NOTE πŸ’€

lowkey important: the request is ignored if a protection shutdown or reboot is already pending β€” even if the previous request gave a large timeout for forced shutdown/reboot. so multiple requests don't stack, periodt 🚫

🌈 SEE ALSO 🌈

Kernel file ./kernel/reboot.c and all these besties:


πŸŽ€ that's the page, bestie! it's from the ./kernel source tree and it's dated October 2026 β€” slay, go keep your hardware safe πŸ’œπŸ«Ά

πŸ“¦ where this page comes from