STRUCT NBCON_WRITE_CONTEXT(9)
π struct nbcon_write_context(9) π
okay so bestie, welcome to the Kernel API Manual β this page is literally all about the context handed to the nbcon write callbacks, and it is lowkey iconic. let's get into it π β¨
π NAME π
struct nbcon_write_context β Context handed to the nbcon write callbacks π«Ά
β¨ SYNOPSIS β¨
struct nbcon_write_context {
struct nbcon_context ctxt;
char *outbuf;
unsigned int len;
bool unsafe_takeover;
#ifdef CONFIG_PRINTK_EXECUTION_CTX;
int cpu;
pid_t pid;
char comm[TASK_COMM_LEN];
#endif;
};
π«Ά Members π«Ά
the way this struct has layers, fr fr π the cpu, pid, and comm members are sitting inside the #ifdef CONFIG_PRINTK_EXECUTION_CTX block up in the synopsis β don't forget the conditional, bestie π
ctxtβ The core console context πoutbufβ Pointer to the text buffer for output β¨lenβ Length to write πunsafe_takeoverβ If a hostile takeover in an unsafe state has occurred ππcpuβ CPU on which the message was generated π₯οΈpidβ PID of the task that generated the message π§commβ Name of the task that generated the message π·οΈ
π SEE ALSO π
Kernel file ./include/linux/console.h:
struct consw(9)enum cons_flags(9)struct nbcon_state(9)enum nbcon_prio(9)struct nbcon_context(9)struct console(9)console_srcu_read_flags(9)console_srcu_write_flags(9)for_each_console_srcu(9)for_each_console(9)
this cutie is from ./include/linux, dated October 2026, and it's literally struct nbcon_write_context(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