console_lock...nning_enable(9)
π
console_lock...nning_enable(9) β a Kernel API Manual moment π
okay so bestie, welcome to the Kernel API Manual, and today's main character is console_lock_spinning_enable β¨ she's short, she's sweet, she's literally one function, and she's carrying the whole vibe check for the console lock π«Ά
β¨ NAME β¨
console_lock_spinning_enable β marks the beginning of the code section where another thread might safely busy wait π no cap, that's the whole job
πΈ SYNOPSIS πΈ
void console_lock_spinning_enable (void );
π¦ ARGUMENTS π¦
voidβ literally no arguments, she takes nothing, she needs nothing π
π DESCRIPTION π
so basically? this converts console_lock into a spinlock. periodt π₯
this marks the section where the console_lock owner can not sleep, because there may be a waiter spinning (like a spinlock) π also β and this is the important part β it must be ready to hand over the lock at the end of the section π
it's giving "hold my spot, i'm almost done" energy fr fr π§
π SEE ALSO π
Kernel file ./kernel/printk/printk.cconsole_list_lock(9)console_list_unlock(9)console_srcu_read_lock(9)console_srcu_read_unlock(9)console_lock_spinning_disable_and_check(9)console_trylock_spinning(9)printk_parse_prefix(9)add_preferred_console(9)match_devname_and_update_preferred_console(9)console_suspend_all(9)console_cpu_notify(9)console_lock(9)console_trylock(9)console_unlock(9)console_flush_on_panic(9)printk_kthreads_shutdown(9)console_force_preferred_locked(9)pr_flush(9)wake_up_klogd(9)defer_console_output(9)printk_trigger_flush(9)printk_timed_ratelimit(9)kmsg_dump_register(9)kmsg_dump_unregister(9)kmsg_dump_desc(9)kmsg_dump_get_line(9)kmsg_dump_get_buffer(9)kmsg_dump_rewind(9)console_try_replay_all(9)__printk_cpu_sync_wait(9)__printk_cpu_sync_try_get(9)__printk_cpu_sync_put(9)
like, that's the whole friend group right there and they all ate π
kisses bestie, that's the page π this one lives at ./kernel/printk, dated October 2026, and it's filed under console_lock...nning_enable(9) β go read it again if you need, i'll wait πβ¨
π¦ 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