nbcon_legac..._next_record(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– nbcon_legacy_emit_next_record β€” legacy-context nbcon record printing, bestie πŸ’–

okay so this is the nbcon_legac..._next_record(9) page from the Kernel API Manual, and we are literally about to make printk legacy-context behavior make sense. no cap. ✨


🌸 NAME 🌸

nbcon_legacy_emit_next_record β€” Print one record for an nbcon console in legacy contexts. πŸ–¨οΈ


πŸ¦‹ SYNOPSIS πŸ¦‹

bool nbcon_legacy_emit_next_record (struct console *con , bool *handover
, int cookie , bool use_atomic );

πŸŽ€ ARGUMENTS πŸŽ€

  • con β€” the console to print on. πŸ–¨οΈ
  • handover β€” will be set to true if a printk waiter has taken over the console_lock, in which case the caller is no longer holding both the console_lock and the SRCU read lock. Otherwise it is set to false. πŸ™ˆ
  • cookie β€” the cookie from the SRCU read lock. πŸͺ
  • use_atomic β€” set true when called in an atomic or unknown context. It affects which nbcon callback will be used: write_atomic or write_thread. ⚑

πŸ’… DESCRIPTION πŸ’…

When false, the write_thread callback is used and would be called in a preemptible context unless disabled by the device_lock. The legacy handover is not allowed in this mode. 🚫

False happens when there is no pending record, or when the console context cannot be acquired, or the ownership has been lost. The caller should give up. Either the job is done, cannot be done, or will be handled by the owning context. 😭

This function is meant to be called by console_flush_all to print records on nbcon consoles from legacy context (printing via console unlocking). Essentially it is the nbcon version of console_emit_next_record. πŸ‘‘


🌈 CONTEXT 🌈

Any context except NMI. ⚠️


⭐ RETURN ⭐

True, when a record has been printed and there are still pending records. The caller might want to continue flushing. πŸ’«


πŸ”₯ SEE ALSO πŸ”₯

Kernel file ./kernel/printk/nbcon.c and these absolute icons:


cute little sign-off, bestie: source/version is ./kernel/printk, the date is October 2026, and the page is nbcon_legac..._next_record(9). mwah. πŸ’‹πŸŽ€

πŸ“¦ where this page comes from