DEFINE_PRINTKRB(9)
okay so bestie π weβre looking at DEFINE_PRINTKRB(9) from the Kernel API Manual, and itβs literally a macro moment β letβs get into it, no cap.
πΈ NAME πΈ
DEFINE_PRINTKRB β Define a ringbuffer.
β¨ SYNOPSIS β¨
DEFINE_PRINTKRB (name , descbits , avgtextbits );
π ARGUMENTS π
nameβ The name of the ringbuffer variable. iconic, honestly.descbitsβ The number of descriptors as a power-of-2 value.avgtextbitsβ The average text data size per record as a power-of-2 value.
π DESCRIPTION π
This is a macro for defining a ringbuffer and all internal structures such that it is ready for immediate use. fr fr, it sets the whole thing up.
If you need a variant where the text data buffer can be specified externally, go look at _DEFINE_PRINTKRB β thatβs the one, bestie. π«Ά
lowkey important: this page is aboutDEFINE_PRINTKRB, and_DEFINE_PRINTKRBis the externally-specified-text-buffer variant. donβt mix them up π
π SEE ALSO π
- Kernel file
./kernel/printk/printk_ringbuffer.h prb_rec_init_wr(9)prb_rec_init_rd(9)prb_for_each_record(9)prb_for_each_info(9)
mwah π source/version is ./kernel/printk, dated October 2026, and this is the DEFINE_PRINTKRB(9) page β thatβs the whole vibe, 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