nbcon_conte...re_requested(9)
π nbcon_conte...re_requested β the Kernel API Manual, bestie edition β¨
okay so this page is from the Kernel API Manual and it's about nbcon_context_try_acquire_requested, which lowkey is the "you asked nicely, now let's see if you actually get it" function π«Ά
β¨ NAME β¨
nbcon_context_try_acquire_requested β bestie, this is the "try to acquire after having requested a handover" one π
π¦ SYNOPSIS π¦
int nbcon_context_try_acquire_requested (struct nbcon_context *ctxt ,
struct nbcon_state *cur );
π ARGUMENTS π
ctxtβ the context of the caller, aka you, the one asking π«΅curβ the current console state, the vibe check of the console rn β¨
πΈ DESCRIPTION πΈ
okay so picture this: this is a helper function for nbcon_context_try_acquire_handover β it's literally the sidekick π€ It gets called when the console is in an unsafe state. The way it works is the current owner will release the console on exit from the unsafe region. so it's giving "I'm leaving the group chat, the key is on the table" energy π
Errors (aka the ways this can go wrong, and bestie there are two π):
-EPERMβ either a panic is in progress and this is not the panic CPU, or this context is no longer the waiter. so rude π-EBUSYβ the console is still locked. the caller should continue waiting. yes we're in the queue, no it's not moving, stay seated πͺ
π RETURN π
0 on success β and hey, cur gets updated to the new console state, slay β¨ Otherwise you get an error code on failure. no cap.
π NOTE π
β οΈ important caveat bestie: the caller must still remove the request when an error has occurred β except when this context is no longer the waiter. that exception is the whole plot twist, don't forget it π
π SEE ALSO π
Kernel file ./kernel/printk/nbcon.c β and honestly the whole friend group is here, iykyk π
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_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_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)
πΈ okay that's the whole page, you ate that π this lil gem lives in ./kernel/printk, dated October 2026, periodt π
β¨
π¦ 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