read_seqretry(9)
β¨ read_seqretry β like, the Kernel API Manual but make it cute β¨
Okay so bestie, gather round, because we are about to talk about read_seqretry from the Kernel API Manual and it is literally the closing act of a seqlock read. No cap, it's giving "the sequel to read_seqbegin" and I am obsessed. π
πΈ NAME πΈ
read_seqretry β okay so this is the function that ends a seqlock_t read side section, periodt. That's the whole vibe. π
π¦ SYNOPSIS π¦
Here's the signature, and yes you have to type it exactly like this, no edits, no "oops I changed a word":
unsigned read_seqretry (const seqlock_t *sl , unsigned start );
It returns an unsigned, takes a const seqlock_t * and an unsigned start. Iconic little combo, honestly. β
π ARGUMENTS π
slβ this is aPointer to seqlock_t. Like, it's the seqlock you're working with. The main character. πstartβ this is thecount, from read_seqbegin. You got this value fromread_seqbeginearlier and now you're handing it back. Teamwork, fr fr. π«Ά
π DESCRIPTION π
So read_seqretry closes the read side critical section of the given seqlock_t. That's its whole job. It's the "okay I'm done reading, did anything mess with my data while I was in there?" check. π
β οΈ Important caveat, bestie: if the critical section was invalid, it must be ignored (and typically retried). Do not use that data. Do not pass go. Do not collect $200. Just ignore it and try again. This is not a drill. π
π RETURN π
trueβ a read section retry is required. So like, yeah, that read didn't go great, try again.falseβ no retry needed. You're slaying. You can keep the data. β¨
π₯ SEE ALSO π₯
Okay this list is long and I am not about to leave anyone out because every single one of these is part of the seqlock family and they all ate. π
Kernel file ./include/linux/seqlock.h β and then the whole squad, exactly as listed:
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), 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), 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)
Like I said: the whole squad. No one left behind. π§
π«Ά Cute little sign-off: this page lives in./include/linuxand is datedOctober 2026, straight from the Kernel API Manual. Stay safe, close your read sections, and remember: if it's invalid, ignore it and retry. Bye bestie! ππΈ
π¦ 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