local_trylock(9)
πΈ NAME πΈ
okay so this is local_trylock(9) from the Kernel API Manual, and the whole point is: local_trylock β try to acquire a per CPU local lock π
β¨ SYNOPSIS β¨
the signature, literally:
local_trylock (lock );
π ARGUMENTS π
lockβ the lock variable. that's the arg, bestie π«Ά
π« DESCRIPTION π«
okay so this function can be used in any context, such as NMI or HARDIRQ. iconic.
but due to locking constrains it will _always_ fail to acquire the lock in NMI or HARDIRQ context on PREEMPT_RT. no cap, that's the caveat π
π¦ SEE ALSO π¦
the squad, plus the kernel file:
- Kernel file
./include/linux/local_lock.h local_lock_init(9)local_lock(9)local_lock_irq(9)local_lock_irqsave(9)local_unlock(9)local_unlock_irq(9)local_unlock_irqrestore(9)local_trylock_init(9)local_trylock_irqsave(9)
mwah π β source/version: ./include/linux; date: October 2026; page: local_trylock(9). periodt π
π¦ 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