DEFINE_PRINTKRB(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

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 about DEFINE_PRINTKRB, and _DEFINE_PRINTKRB is the externally-specified-text-buffer variant. don’t mix them up πŸ’…

🌈 SEE ALSO 🌈


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