local_trylock_irqsave(9)
π NAME π
okay so bestie, meet local_trylock_irqsave(9) β a function from the Kernel API Manual β and its whole vibe is: try to acquire a per CPU local lock, and if it gets acquired, save and disable interrupts. β¨
β¨ SYNOPSIS β¨
local_trylock_irqsave (lock , flags );
πΈ ARGUMENTS πΈ
lockβ the lock variable, aka the thing you're trying to snag πflagsβ storage for interrupt flags, aka where the interrupt flags live π
π DESCRIPTION π
This one can be used in any context, such as NMI or HARDIRQ. π But here's the tea, and it is important: due to locking constrains, it will always fail to acquire the lock in NMI or HARDIRQ context on PREEMPT_RT. Like, not βsometimes,β not βif the stars alignβ β always. π
π SEE ALSO π
Kernel file ./include/linux/local_lock.h β go look, bestie π¦ β plus these icons:
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(9)
That's the whole page, bestie. Signed with love from ./include/linux, October 2026, under the title local_trylock_irqsave(9) β 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