__nbcon_atom..._pending_con(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… NAME πŸ’…

okay so bestie, this is the Kernel API Manual page __nbcon_atom..._pending_con(9), and the actual function name is __nbcon_atomic_flush_pending_con. It does one thing: flush the specified nbcon console using its write_atomic() callback. That's the whole vibe.

✨ SYNOPSIS ✨

Here's the signature, no cap:

int __nbcon_atomic_flush_pending_con (struct console *con , u64 stop_seq
);

πŸŽ€ ARGUMENTS πŸŽ€

  • con β€” the nbcon console to flush. The console in question, bestie.
  • stop_seq β€” flush up until this record. Like, stop at this sequence, okay?

πŸ’– RETURN πŸ’–

It returns 0 if con was flushed up to stop_seq. Otherwise, you get an error code on failure. That's the tea. πŸ«–

🌸 DESCRIPTION 🌸

So this function flushes the specified nbcon console using its write_atomic() callback, and if it can't get all the way to stop_seq, it hands you back an error code. Simple enough. But the errors have lore, so listen up:

πŸ’€ Errors πŸ’€

  • -EPERM: Unable to acquire console ownership.
  • -EAGAIN: Another context took over ownership while printing.
  • -ENOENT: A record before stop_seq is not available.

If flushing up to stop_seq was not successful, it only makes sense for the caller to try again when -EAGAIN was returned. When -EPERM is returned, this context is not allowed to acquire the console. When -ENOENT is returned, it cannot be expected that the unfinalized record will become available.

no cap, those three error codes are doing different jobs. don't mix them up. πŸ’…

πŸ¦‹ SEE ALSO πŸ¦‹

Kernel file ./kernel/printk/nbcon.c and the whole nbcon friend group:

xoxo, your ./kernel/printk bestie, dated October 2026 πŸŽ€βœ¨

πŸ“¦ where this page comes from