nbcon_can_proceed(9)
π nbcon_can_proceed(9)
okay so welcome to the nbcon_can_proceed(9) page, bestie β it lives in the Kernel API Manual and it's lowkey one of the most "am I still the main character here?" functions in the whole printk cinematic universe π
β¨ NAME β¨
nbcon_can_proceed β check whether ownership can proceed, aka the vibe check for your console lock π
πΈ SYNOPSIS πΈ
bool nbcon_can_proceed (struct nbcon_write_context *wctxt );
π¦ ARGUMENTS π¦
wctxtβ the write context that was handed to the write function. it's literally the little passport you got given, and yes we're gonna check it π
β RETURN β
- True β this context still owns the console. you ate, you're still that girl π
- False β ownership was handed over or taken. not yours anymore, no cap π
π DESCRIPTION π
so here's the tea π: it's used in nbcon_enter_unsafe to make sure that it still owns the lock. also it's used in nbcon_exit_unsafe to eventually free the lock for a higher priority context which asked for the friendly handover β very "here, take the aux cord" of them π«Ά
it can be called inside an unsafe section when the console is just temporary in safe state, instead of exiting and entering the unsafe state. less drama, same result β¨
also it can be called in the safe context before doing an expensive safe operation. ngl it does not make sense to do the operation when a higher priority context took the lock β like why would you do all that work for nobody π
when this function returns false then the calling context no longer owns the console and is no longer allowed to go forward. in this case it must back out immediately and carefully π¨ the buffer content is also no longer trusted since it no longer belongs to the calling context. so like, do NOT keep reading that buffer, it's giving someone else's diary now π
π§ SEE ALSO π§
kernel file ./kernel/printk/nbcon.c, plus the whole friend group:
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_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_legacy_emit_next_record(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)
β¨ that's the whole page, periodt β¨
cute lil sign-off before you go: this one's from ./kernel/printk, dated October 2026, and it's filed under nbcon_can_proceed(9) β mwah, go check your ownership before you proceed bestie ππ¦
π¦ 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