nbcon_emit_next_record(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– nbcon_emit_next_record(9) β€” from the Kernel API Manual, bestie πŸ’–

okay so picture this: you're holding the console, the console is yours, and now you gotta actually emit a record in the context you already acquired. That's the whole vibe of nbcon_emit_next_record(9), straight out of the Kernel API Manual. Let's get into it πŸŽ€


✨ SYNOPSIS ✨

bool nbcon_emit_next_record (struct nbcon_write_context *wctxt , bool
use_atomic );

🫢 ARGUMENTS 🫢

  • wctxt β€” the write context, aka the thing that gets handed off to the write function. it's giving "delivery driver, here's the package" πŸ“¦
  • use_atomic β€” true if you want the write_atomic callback to be the one doing the work

⭐ RETURN ⭐

Returns true if this context still owns the console. Returns false if ownership was handed over or taken β€” like, stolen, lowkey πŸ’€


πŸ’… DESCRIPTION πŸ’…

okay so here's the important part, bestie, listen up:

When this function returns false, the calling context no longer owns the console and is literally not allowed to keep going. Not even a little. In that case it has to back out immediately and carefully β€” no cap, carefully. The buffer content is also no longer trusted, because it doesn't belong to the calling context anymore. So if you're the caller and you want to do more stuff? You gotta reacquire the console first. Periodt. πŸ‘‘

When true is returned, wctxt->ctxt.backlog tells you whether there are still records pending in the ringbuffer. it's your little status check 🌸

⚠️ real talk: false means hands off. don't touch the buffer, don't keep writing, just exit gracefully and reacquire. the console said "not yours anymore" and we respect the console πŸ’€

🌈 SEE ALSO 🌈

the whole friend group, fr fr β€” kernel file ./kernel/printk/nbcon.c, plus:


okay that's the whole page!! πŸ¦‹ this gem lives over in ./kernel/printk, dated October 2026 β€” she's from the future and she's iconic for it πŸ‘‘βœ¨ mwah, go emit some records responsibly πŸ’œ

πŸ“¦ where this page comes from