for_each_console(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

🌸 NAME 🌸

okay so this is the for_each_console(9) page from the Kernel API Manual, and the name is literally: Iterator over registered consoles. that’s the whole vibe: it walks the registered consoles, bestie. πŸ’…


✨ SYNOPSIS ✨

here’s the synopsis, character for character:

for_each_console (con );

πŸŽ€ ARGUMENTS πŸŽ€

  • con β€” a struct console pointer used as the loop cursor. it’s the little β€œwhere am I rn” pointer for the loop, iykyk. πŸ¦‹

πŸ’– DESCRIPTION πŸ’–

okay so important thing: the console list and the console.flags are immutable while iterating. no cap, don’t be out here trying to change them mid-loop. πŸ™ˆ

it also requires console_list_lock to be held. like, that lock is not optional, bestie. πŸ”’

πŸ’€ real talk: keep console_list_lock held, and remember the console list plus console.flags are immutable while you iterate. that’s the whole mood.

πŸ¦‹ SEE ALSO πŸ¦‹


πŸ’– that’s the page, bestie β€” source/version: ./include/linux, date: October 2026. periodt. πŸŽ€βœ¨

πŸ“¦ where this page comes from