read_seqbeg...lock_irqsave(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– NAME πŸ’–

okay so this is the Kernel API Manual entry for read_seqbegin_or_lock_irqsave (a.k.a. read_seqbeg...lock_irqsave(9)), and it is literally: begin a seqlock_t lockless reader, or a non-interruptible locking reader. πŸ’…βœ¨


✨ SYNOPSIS ✨

unsigned long read_seqbegin_or_lock_irqsave (seqlock_t *lock , int *seq
);

πŸŽ€ ARGUMENTS πŸŽ€

  • lock β€” Pointer to seqlock_t. 🫢
  • seq β€” Marker and return parameter. Check read_seqbegin_or_lock. πŸ‘€

πŸ¦‹ DESCRIPTION πŸ¦‹

bestie, this is the _irqsave variant of read_seqbegin_or_lock. Use it only if the seqlock_t write section, or other read sections, can be invoked from hardirq context. 😀 no cap, that condition is doing main character energy.

the numbered lore is:

  1. The saved local interrupts state in case of a locking reader, to be passed to done_seqretry_irqrestore.
  2. The encountered sequence counter value, returned through seq overloaded as a return parameter. Check read_seqbegin_or_lock.

⚠️ NOTE ⚠️

Interrupts will be disabled only for "locking reader" mode. πŸ’€ that part matters, bestie.

πŸ‘€ SEE ALSO πŸ‘€

Kernel file ./include/linux/seqlock.h β€” plus the whole iconic squad:


xoxo, your kernel bestie πŸ’– β€” source/version: ./include/linux; date: October 2026; page: read_seqbeg...lock_irqsave(9). mwah! πŸŽ€

πŸ“¦ where this page comes from