nbcon_legac..._next_record(9)
π 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 totrueif a printk waiter has taken over theconsole_lock, in which case the caller is no longer holding both theconsole_lockand the SRCU read lock. Otherwise it is set tofalse. πcookieβ the cookie from the SRCU read lock. πͺuse_atomicβ settruewhen called in an atomic or unknown context. It affects which nbcon callback will be used:write_atomicorwrite_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:
nbcon_state_set(9)nbcon_state_read(9)nbcon_state_try_cmpxchg(9)nbcon_seq_read(9)nbcon_seq_force(9)nbcon_seq_try_update(9)nbcon_context_try_acquire_direct(9)nbcon_context_try_acquire_requested(9)nbcon_context_try_acquire_handover(9)nbcon_context_try_acquire_hostile(9)nbcon_context_try_acquire(9)nbcon_context_release(9)nbcon_context_can_proceed(9)nbcon_can_proceed(9)__nbcon_context_update_unsafe(9)nbcon_enter_unsafe(9)nbcon_exit_unsafe(9)nbcon_reacquire_nobuf(9)nbcon_emit_next_record(9)nbcon_kthread_should_wakeup(9)nbcon_kthread_func(9)nbcon_irq_work(9)nbcon_kthreads_wake(9)nbcon_kthread_create(9)nbcon_get_cpu_emergency_nesting(9)nbcon_get_default_prio(9)nbcon_allow_unsafe_takeover(9)__nbcon_atomic_flush_pending_con(9)nbcon_atomic_flush_pending_con(9)__nbcon_atomic_flush_pending(9)nbcon_atomic_flush_pending(9)nbcon_atomic_flush_unsafe(9)nbcon_cpu_emergency_enter(9)nbcon_cpu_emergency_exit(9)nbcon_alloc(9)nbcon_free(9)nbcon_device_try_acquire(9)nbcon_device_release(9)nbcon_kdb_try_acquire(9)nbcon_kdb_release(9)nbcon_write_context_is_braille(9)nbcon_braille_try_acquire(9)nbcon_braille_release(9)
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
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms