|
NAMEintro —
introduction to system kernel interfaces
DESCRIPTIONThis section contains information about the interfaces and subroutines in the kernel.PROTOTYPES ANSI-C AND ALL THATYes please.We would like all code to be fully prototyped. If your code compiles cleanly with INDENTATION AND STYLEBelieve it or not, there actually exists a guide for indentation and style. It is not generally applied though.We would appreciate if people would pay attention to it, and at least not violate it blatantly. We do not mind it too badly if you have your own style, but please make sure we can read it too. Please take time to read style(9) for more information. NAMING THINGSSome general rules exist:
SCOPE OF SYMBOLSIt 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. 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. 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 ALSOstyle(9)HISTORYTheintro section manual page appeared in
FreeBSD 2.2.
Visit the GSP FreeBSD Man Page Interface. |