INTRO(9)
π INTRO(9) π
okay so welcome to section 9 of the Kernel Developer's Manual bestie, this is literally the intro page and it's your little backstage pass to the kernel β¨
πΈ NAME πΈ
intro β introduction to system kernel interfaces π«Ά
π¦ DESCRIPTION π¦
This section contains information about the interfaces and subroutines in the kernel. that's it that's the whole vibe, it's the lore hub for kernel devs π
β¨ PROTOTYPES ANSI-C AND ALL THAT β¨
Yes please. π
We would like all code to be fully prototyped. no cap, all of it.
If your code compiles cleanly with cc -Wall we would feel happy about it. π₯° and listen β it is important to understand that this is not a question of just shutting up cc, it is a question about avoiding the things it complains about. to put it bluntly: do not hide the problem by casting and other obfuscating practices, solve the problem. periodt. π
not me watching you slap a cast on a warning and call it a dayβ¦ girl no. fix it fr fr π
π INDENTATION AND STYLE π
Believe it or not, there actually exists a guide for indentation and style. it is not generally applied though. π (we know. we know.)
We would appreciate if people would pay attention to it, and at least not violate it blatantly. like, minimum effort babes π«Ά
We do not mind it too badly if you have your own style, but please make sure we can read it too. main character energy is fine as long as the rest of us can follow the plot π
Please take time to read style(9) for more information. go read it. right now. it's giving required reading π
π NAMING THINGS π
Some general rules exist:
- If a function is meant as a debugging aid in
DDB, it should be enclosed in
#ifdef DDB
#endif /* DDB */
And the name of the procedure should start with the prefix DDB_ to clearly identify the procedure as a debugger routine. π
π SCOPE OF SYMBOLS π
It is important to carefully consider the scope of symbols in the kernel. the default is to make everything static, unless some reason requires the opposite. π₯
There are several reasons for this policy, the main one is that the kernel is one monolithic name-space, and pollution is not a good idea here either. one giant shared namespace bestie, we are not trashing it π§
For device drivers and other modules that do not add new internal interfaces to the kernel, the entire source should be in one file if possible. that way all symbols can be made static. slay, tidy, contained β¨
If for some reason a module is split over multiple source files, then try to split the module along some major fault-line and consider using the number of global symbols as your guide. the fewer the better. β
π SEE ALSO π
β HISTORY β
The intro section manual page appeared in FreeBSD 2.2. iconic behavior honestly πΈ
and that's the whole page bestie!! this one came out of Debian and it's dated December 13, 1995 β ancient. vintage. a classic. go write some fully-prototyped, -Wall-clean, properly-static-ed code now, i believe in you π«Άπβ¨
π¦ where this page comes from
- debian bookworm: freebsd-manpages 12.2-1 Β· BSD-2-Clause-FreeBSD AND BSD-4-Clause
- debian trixie: freebsd-manpages 12.2-2 Β· BSD-2-Clause-FreeBSD AND BSD-4-Clause
- ubuntu jammy: freebsd-manpages 12.2-1 Β· BSD-2-Clause-FreeBSD AND BSD-4-Clause
- ubuntu noble: freebsd-manpages 12.2-1 Β· BSD-2-Clause-FreeBSD AND BSD-4-Clause
- ubuntu questing: freebsd-manpages 12.2-2
- ubuntu resolute: freebsd-manpages 12.2-2build1 Β· BSD-2-Clause-FreeBSD AND BSD-4-Clause
- ubuntu stonking: freebsd-manpages 12.2-2build1 Β· BSD-2-Clause-FreeBSD AND BSD-4-Clause
- Copyright (c) 1983, 1991, 1993 The Regents of the University of California. All rights reserved
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms