raw_read_seqcount_latch(9)
π raw_read_seqcount_latch(9) π
okay bestie, welcome to the Kernel API Manual page for raw_read_seqcount_latch(9) β the little function whose whole job is picking which latch data copy you read. it's giving tiny-but-important, and we're gonna be so normal about it. β¨
πΈ NAME πΈ
raw_read_seqcount_latch β pick even/odd latch data copy
β¨ SYNOPSIS β¨
unsigned raw_read_seqcount_latch (const seqcount_latch_t *s );
π ARGUMENTS π
sβ Pointer toseqcount_latch_t. that's the whole argument, bestie, no secret extra params. π«Ά
π¦ DESCRIPTION π¦
See raw_write_seqcount_latch for details and a full reader/writer usage example.
like, yes, that's literally the description β the details and the full reader/writer usage example live over in raw_write_seqcount_latch, so go read that one too. no cap. π
π₯ RETURN π₯
You get back the sequence counter raw value. Use the lowest bit as an index for picking which data copy to read. The full counter must then be checked with raw_read_seqcount_latch_retry.
so don't just grab it and run β that lowest bit is your index, and then the full counter gets the raw_read_seqcount_latch_retry vibe check. periodt. π
π SEE ALSO π
Kernel file ./include/linux/seqlock.h β the whole seqcount/seqlock friend group starts here, and the guest list is long:
seqcount_init(9)SEQCNT_ZERO(9)__read_seqcount_begin(9)raw_read_seqcount_begin(9)read_seqcount_begin(9)raw_read_seqcount(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)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)
mwah π β this one is from the Kernel API Manual, source ./include/linux, dated October 2026, and it's raw_read_seqcount_latch(9) to the end. periodt. π«Άπ
π¦ 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