ring_buffer_...rd_is_on_cpu(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… ring_buffer_record_is_on_cpu β€” from the Kernel API Manual (section 9), bestie edition πŸŽ€

okay so you opened the Kernel API Manual and landed on this one, and honestly? it's a lil cutie. it's a yes/no girlie. it tells you whether the ring buffer is currently willing to accept writes on a specific CPU. that's the whole vibe. let's get into it ✨


🌸 NAME 🌸

ring_buffer_record_is_on_cpu β€” return true if the ring buffer can write

like, that's literally the whole personality. it returns true if the ring buffer can write. no cap πŸ’…


🫢 SYNOPSIS 🫢

bool ring_buffer_record_is_on_cpu (struct trace_buffer *buffer , int cpu
);

it takes two things and gives you back a bool. short, sweet, iconic πŸ‘‘


πŸ¦‹ ARGUMENTS πŸ¦‹

  • buffer β€” the ring buffer you're checking on, aka the one you're asking "bestie, are you accepting writes rn?" πŸ“
  • cpu β€” the CPU you want to test, because the ring buffer can be writing on some CPUs and not others, and you gotta be specific about which one you're asking about πŸ’–

πŸ”₯ DESCRIPTION πŸ”₯

Returns true if the ring buffer is in a state where it accepts writes for a particular CPU. that's it. that's the function. no weird side quests, no hidden lore. it's giving "simple and reliable" and we love that for it 🌈


πŸ‘‘ SEE ALSO πŸ‘‘

so the source for all this lives in the kernel file ./kernel/trace/ring_buffer.c, and the whole ring buffer friend group is listed below β€” every single one of them, because nobody gets left out in this house 🫢

like yes that's a lot of reading but every single one ate, i fear πŸ’€βœ¨


and that's the page, bestie!! πŸ’– brought to you straight out of ./kernel/trace, dated October 2026 β€” go forth and check your buffers, mwah πŸ§šβ€β™€οΈπŸŒΈ

πŸ“¦ where this page comes from