hwspin_unlock(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– NAME πŸ’–

Okay bestie, welcome to hwspin_unlock(9) β€” yes, that's the manual name, and yes, this is the Kernel API Manual page for hwspin_unlock: the function that unlocks a hwspinlock. Iconic little cleanup moment, honestly. πŸŽ€


✨ SYNOPSIS ✨

void hwspin_unlock (struct hwspinlock *hwlock );

🫢 ARGUMENTS 🫢

  • hwlock β€” a previously-acquired hwspinlock which we want to unlock. That's the whole vibe: it's the lock you already grabbed, and now you're handing it back. πŸ’…

🌸 DESCRIPTION 🌸

This function will unlock a specific hwspinlock and enable preemption back. Slay, preemption is back on the menu. ✨

But listen: hwlock must be already locked (e.g. by hwspin_trylock) before calling this function. Not me calling unlock on a lock that's already unlocked πŸ’€ β€” that is a bug. Periodt. No cap. If it's already unlocked, you do not pass go, you do not collect $200, because calling unlock on a hwlock that is already unlocked is a bug.

Bestie, this is the β€œput it back” function. Only put back what you actually took. 🧚

πŸ¦‹ SEE ALSO πŸ¦‹

Kernel file: ./include/linux/hwspinlock.h

The whole lock-and-unlock friend group, all here with their (9) energy:


Cute little sign-off bestie: this page comes from ./include/linux, dated October 2026, and it is literally hwspin_unlock(9). Go unlock responsibly, mwah πŸ’‹πŸ’–

πŸ“¦ where this page comes from