write_seqlock(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… write_seqlock(9) β€” a Kernel API Manual moment

okay so first of all, bestie, this page lives in the Kernel API Manual and it's about write_seqlock. yes the name is a mouthful, no we're not skipping it, it's iconic. ✨


🌸 NAME

write_seqlock β€” start a seqlock_t write side critical section

like, you're opening the write side of the party. main character energy only.


πŸŽ€ SYNOPSIS

void write_seqlock (seqlock_t *sl );

πŸ’– ARGUMENTS

  • sl β€” pointer to seqlock_t. that's it. that's the whole argument list. she's low maintenance.

✨ DESCRIPTION

write_seqlock opens a write side critical section for the given seqlock_t. periodt.

and like, it also implicitly acquires the spinlock_t embedded inside that sequential lock β€” so it's doing two things at once, multi-tasking queen 🫢. because of that, all seqlock_t write side sections are automatically serialized and non-preemptible. no cap, that's just how she runs.


πŸ¦‹ CONTEXT

okay this is the important bit, so listen up πŸ™ˆ β€” if the seqlock_t read section, or other write side critical sections, can be invoked from hardirq or softirq contexts, use the _irqsave or _bh variants of this function instead.

like literally do not rawdog the plain version in irq context, bestie, that's not the vibe πŸ’€

πŸ‘‘ SEE ALSO

Kernel file ./include/linux/seqlock.h and honestly her whole extended friend group:


k bye bestie, this page came from ./include/linux and it's dated October 2026, and yes we're still calling it write_seqlock(9) because consistency is cute πŸ’…βœ¨

πŸ“¦ where this page comes from