prb_for_each_record(9)
β¨ NAME β¨
okay so this is prb_for_each_record(9) from the Kernel API Manual, and it is literally a macro for iterating over the records of a ringbuffer. bestie, it's giving βloop through ringbuffer records, but make it convenient.β π
π SYNOPSIS π
prb_for_each_record (from , rb , s , r );
π ARGUMENTS π
fromβ the sequence number to begin with, bestie.rbβ the ringbuffer you're iterating over. iconic.sβ au64to store the sequence number on each iteration.rβ aprintk_recordto store the record on each iteration.
π§ DESCRIPTION π§
This is a macro for conveniently iterating over a ringbuffer. no cap, that's the whole vibe. π¦
heads up though:smay not be the sequence number of the record on each iteration. not me assuming it is π if you actually need the sequence number, you should checkr->info->seq.
π CONTEXT π
Any context. literally any. β¨
π₯ SEE ALSO π₯
- Kernel file
./kernel/printk/printk_ringbuffer.h DEFINE_PRINTKRB(9)prb_rec_init_wr(9)prb_rec_init_rd(9)prb_for_each_info(9)
source/version ./kernel/printk, dated October 2026 β mwah, drink water, and check r->info->seq ππ
π¦ 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