hwspin_unlock(9)
π 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:
hwspin_trylock_irqsave(9)hwspin_trylock_irq(9)hwspin_trylock_raw(9)hwspin_trylock_in_atomic(9)hwspin_trylock(9)hwspin_lock_timeout_irqsave(9)hwspin_lock_timeout_irq(9)hwspin_lock_timeout_raw(9)hwspin_lock_timeout_in_atomic(9)hwspin_lock_timeout(9)hwspin_unlock_irqrestore(9)hwspin_unlock_irq(9)hwspin_unlock_raw(9)hwspin_unlock_in_atomic(9)
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
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms