hwspin_unlock_irq(9)
π 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:hwlockmust already be locked before you call this (like, for example, byhwspin_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 π
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_raw(9)hwspin_unlock_in_atomic(9)hwspin_unlock(9)
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
- 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