hwspin_unlock_irq(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… hwspin_unlock_irq(9) β€” from the Kernel API Manual, bestie πŸŽ€

okay so real talk, this one's from the Kernel API Manual and it's lowkey the cool-down twin of hwspin_lock_irq. let's get into it ✨


✨ NAME ✨

hwspin_unlock_irq β€” unlock a hwspinlock and turn interrupts back on, periodt πŸ”“πŸ’–


🌸 SYNOPSIS 🌸

void hwspin_unlock_irq (struct hwspinlock *hwlock );

yes bestie that's the whole signature, it returns void, no surprises, no drama 🫢


πŸ¦‹ ARGUMENTS πŸ¦‹

  • hwlock β€” a previously-acquired hwspinlock that we wanna unlock. it's the exact same lock you grabbed before, no substitutions, no imposters πŸ™ˆ

πŸ‘‘ DESCRIPTION πŸ‘‘

so here's the tea β˜•: this function does three iconic things at once β€”

  • it unlocks that specific hwspinlock πŸ”“
  • it enables preemption ⚑
  • it enables local interrupts πŸ’«

think of it as the undoing of hwspin_lock_irq β€” the "ok we're done here, everybody back in" moment 🌈

the important caveat, no cap: hwlock must already be locked before you call this (like, for example, by hwspin_trylock_irq). calling unlock on a hwlock that's already unlocked is a bug. fr fr, don't do it πŸ’€

πŸ”₯ SEE ALSO πŸ”₯

if you wanna go deeper (and you know you do), the kernel file is ./include/linux/hwspinlock.h and here's the whole friend group πŸ‘‡


mwah πŸ’‹ that's the whole page! brought to you from ./include/linux, dated October 2026, and yeah it's literally titled hwspin_unlock_irq(9) β€” go unlock some locks responsibly, bestie πŸ§šπŸ’œ

πŸ“¦ where this page comes from