raw_read_seqcount(9)
π raw_read_seqcount(9) β straight outta the Kernel API Manual π
okay bestie, so this one's from the Kernel API Manual and it's lowkey one of the building blocks of the whole seqlock situation. let's get into it β¨
πΈ NAME πΈ
raw_read_seqcount β read the raw seqcount_t counter value. that's it. that's the vibe check. π
β¨ SYNOPSIS β¨
raw_read_seqcount (s );
π¦ ARGUMENTS π¦
sβ pointer toseqcount_tor any of theseqcount_LOCKNAME_tvariants. yes, any of them, the whole little family is welcome here π«Ά
π DESCRIPTION π
so raw_read_seqcount opens a read critical section of the given seqcount_t, and here's the tea: it does it without any lockdep checking, and without checking or masking the sequence counter LSB. like, none of that. zero. not its job. π
your calling code is the one responsible for handling that LSB situation β that's on you, bestie, not on this function π
β RETURN β
the count, which you then pass on to read_seqcount_retry. it's giving relay-baton energy, iykyk πββοΈπ¨
π SEE ALSO π
the whole friends group chat, no one left out π β plus the kernel file ./include/linux/seqlock.h:
seqcount_init(9)SEQCNT_ZERO(9)__read_seqcount_begin(9)raw_read_seqcount_begin(9)read_seqcount_begin(9)raw_seqcount_try_begin(9)raw_seqcount_begin(9)__read_seqcount_retry(9)read_seqcount_retry(9)raw_write_seqcount_begin(9)raw_write_seqcount_end(9)write_seqcount_begin_nested(9)write_seqcount_begin(9)write_seqcount_end(9)raw_write_seqcount_barrier(9)write_seqcount_invalidate(9)SEQCNT_LATCH_ZERO(9)seqcount_latch_init(9)raw_read_seqcount_latch(9)read_seqcount_latch(9)raw_read_seqcount_latch_retry(9)read_seqcount_latch_retry(9)raw_write_seqcount_latch(9)write_seqcount_latch_begin(9)write_seqcount_latch(9)write_seqcount_latch_end(9)seqlock_init(9)DEFINE_SEQLOCK(9)read_seqbegin(9)read_seqretry(9)write_seqlock(9)write_sequnlock(9)write_seqlock_bh(9)write_sequnlock_bh(9)write_seqlock_irq(9)write_sequnlock_irq(9)write_seqlock_irqsave(9)write_sequnlock_irqrestore(9)read_seqlock_excl(9)read_sequnlock_excl(9)read_seqlock_excl_bh(9)read_sequnlock_excl_bh(9)read_seqlock_excl_irq(9)read_sequnlock_excl_irq(9)read_seqlock_excl_irqsave(9)read_sequnlock_excl_irqrestore(9)read_seqbegin_or_lock(9)need_seqretry(9)done_seqretry(9)read_seqbegin_or_lock_irqsave(9)done_seqretry_irqrestore(9)scoped_seqlock_read(9)
that's the whole page, no skips, no crumbs left behind π
this little cutie lives in ./include/linux and the version stamp says October 2026 β and the page signs itself off as raw_read_seqcount(9), which, iconic. mwah, go read your seqcounts responsibly π§ββοΈπβ¨
π¦ 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