devm_hwspin_lock_free(9)
β¨ devm_hwspin_lock_free(9) β¨
okay so bestie, we're in the Kernel API Manual today and this one is genuinely a little cleanup queen π
β it's devm_hwspin_lock_free, and yes she's managed, yes she's tidy, and yes she's about to give that hwspinlock her freedom back π¦
π NAME π
devm_hwspin_lock_free β free a specific hwspinlock for a managed device. that's it. that's the whole vibe. releasing your lock back into the wild so someone else can have a turn π
β SYNOPSIS β
int devm_hwspin_lock_free (struct device *dev , struct hwspinlock
*hwlock );
look at her. two arguments, returns an int, no drama π
πΈ ARGUMENTS πΈ
devβ the device that's freeing this specific hwspinlock. like, whose lock is it? this one's. π«Άhwlockβ the actual specific hwspinlock being freed. the one and only. no cap.
π DESCRIPTION π
so this function marks hwlock as free again β¨ that's literally the whole job and she does it well.
β οΈ okay important bestie: you should only call this with anhwlockthat was retrieved from an earlier call tohwspin_lock_request{_specific}. not some random lock you found lying around. that's not slay, that's chaos π
also!! this one should be called from a process context β because it might sleep π so no sneaking it into weird contexts, iykyk.
π₯ RETURN π₯
0 on success, or an appropriate error code on failure. she either ate or she didn't, and she'll tell you which π
π¦ SEE ALSO π¦
the whole friend group π«Ά β kernel file ./drivers/hwspinlock/hwspinlock_core.c, plus:
__hwspin_trylock(9)__hwspin_lock_timeout(9)__hwspin_unlock(9)hwspin_lock_bust(9)of_hwspin_lock_simple_xlate(9)of_hwspin_lock_get_id(9)of_hwspin_lock_get_id_byname(9)hwspin_lock_register(9)hwspin_lock_unregister(9)devm_hwspin_lock_unregister(9)devm_hwspin_lock_register(9)__hwspin_lock_request(9)hwspin_lock_request_specific(9)hwspin_lock_free(9)devm_hwspin_lock_request_specific(9)
and that's the page, bestie π this little icon lives in ./drivers/hwspinlock, dated October 2026, and her full name is of course devm_hwspin_lock_free(9) β go forth and free your locks responsibly πβ¨
π¦ 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