nbcon_conte...re_requested(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… 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 πŸ’œ


🌸 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