prb_init(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– prb_init(9) β€” Kernel API Manual glow-up ✨

okay bestie, welcome to prb_init(9) from the Kernel API Manual! This is the page for prb_init, and it's giving β€œset up your ringbuffer with buffers you brought from home” energy. Let's go πŸ’…

🌸 NAME

prb_init β€” Initialize a ringbuffer to use provided external buffers. Periodt. πŸŽ€

✨ SYNOPSIS

void prb_init (struct printk_ringbuffer *rb , char *text_buf , unsigned
       int textbits , struct prb_desc *descs , unsigned int descbits , struct
       printk_info *infos );

🧚 ARGUMENTS

  • rb β€” the ringbuffer to initialize. that's the main character you're setting up πŸ’–
  • text_buf β€” the data buffer for text data. it's where the text lives, no cap.
  • textbits β€” the size of text_buf as a power-of-2 value. yes, power-of-2, not vibes.
  • descs β€” the descriptor buffer for ringbuffer records. iconic.
  • descbits β€” the count of descs items as a power-of-2 value. keep that power-of-2 energy ✨
  • infos β€” the printk_info buffer for ringbuffer records. slay.

πŸ”₯ DESCRIPTION

This is the public function available to writers to setup a ringbuffer during runtime using provided buffers. literally the public-facing setup era πŸ’…

This must match the initialization of DEFINE_PRINTKRB. no cap, it has to match β€” don't freestyle this part. πŸ‘‘

πŸ¦‹ CONTEXT

Any context. that's it. any. context. 🫢

🌈 SEE ALSO

byeee bestie 🫢 β€” source/version ./kernel/printk, dated October 2026, page prb_init(9). mwah πŸ’‹βœ¨

πŸ“¦ where this page comes from