raw_read_seqcount_latch(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… 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 to seqcount_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:

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