nbcon_can_proceed(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

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


✨ 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