read_seqlock_excl_irqsave(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… read_seqlock_excl_irqsave(9) β€” kernel API manual, bestie edition πŸŽ€

okay so picture this: you're deep in the kernel, in a seqlock_t situation, and you need a reader section that absolutely will not be interrupted. that's this function. it's from the kernel API manual and it's lowkey iconic. let's go ✨


🌸 NAME 🌸

read_seqlock_excl_irqsave β€” start a non-interruptible seqlock_t locking reader section. yes bestie, non-interruptible. she does not budge πŸ’…


✨ SYNOPSIS ✨

read_seqlock_excl_irqsave (lock , flags );

that's it. two args. tiny function, big responsibilities 🫢


πŸŽ€ ARGUMENTS πŸŽ€

  • lock β€” pointer to seqlock_t. that's your seqlock, your main character, the whole vibe πŸ”₯
  • flags β€” stack-allocated storage for saving the caller's local interrupt state. and listen: you HAVE to pass this to read_sequnlock_excl_irqrestore. it's giving "matched set, do not separate" πŸ’–

πŸ¦‹ DESCRIPTION πŸ¦‹

so this is the _irqsave variant of read_seqlock_excl. same energy, extra interrupt-safety garnish ✨

🚨 real talk though β€” use this only if the seqlock_t write side section, or other read sections, can be invoked from a hardirq context. note the italics, bestie, they're doing heavy lifting. "or other read sections" is not a suggestion, it's a whole clause 😭

if none of that applies to you? then this is not your girl. pick a cheaper variant and slay responsibly πŸ’€


πŸ‘‘ SEE ALSO πŸ‘‘

the kernel file is ./include/linux/seqlock.h, and honestly the whole seqlock extended family showed up to the group chat. every single one of them:

seqcount crew 🧚

write side seqcount πŸ’œ

latch era 🌈

seqlock setup πŸ“

classic read side ⭐

write seqlock, all the flavours πŸ’…

exclusive read side πŸ‘‘

the or-lock besties πŸ¦‹

and finally 🌸


πŸ’– btw bestie β€” don't forget your unlock. read_sequnlock_excl_irqrestore is literally right there in the list. this function only opens the section; closing it is your job, and the kernel will not be gentle about it. no cap 😭

anyway that's the whole page! this one comes to you courtesy of ./include/linux, dated October 2026, and it's filed under read_seqlock_excl_irqsave(9) β€” go forth, save those interrupts, and remember: irqsave implies irqrestore. periodslay πŸ’…βœ¨πŸŽ€

πŸ“¦ where this page comes from