local_trylock_irqsave(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸŽ€ 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:


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