*nix Documentation Project
·  Home
 +   man pages
·  Linux HOWTOs
·  FreeBSD Tips
·  *niX Forums

  man pages->FreeBSD man pages -> intro (9)              
Title
Content
Arch
Section
 

INTRO(9)

Contents


NAME    [Toc]    [Back]

     intro -- introduction to system kernel interfaces

DESCRIPTION    [Toc]    [Back]

     This section contains information about the interfaces and subroutines in
     the kernel.

PROTOTYPES ANSI-C AND ALL THAT    [Toc]    [Back]

     Yes please.

     We would like all code to be fully prototyped.

     If your code compiles cleanly with cc -Wall we would feel happy about it.
     It is important to understand that this isn't a question of just shutting
     up cc, it is a question about avoiding the things it complains about.  To
     put it bluntly, don't hide the problem by casting and other obfuscating
     practices, solve the problem.

INDENTATION AND STYLE    [Toc]    [Back]

     Believe it or not, there actually exists a guide for indentation and
     style.  It isn't generally applied though.

     We would appreciate if people would pay attention to it, and at least not
     violate it blatantly.

     We don't 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 THINGS    [Toc]    [Back]

     Some general rules exist:

     1.   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    [Toc]    [Back]

     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.

     For device drivers and other modules that don't 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 ALSO    [Toc]    [Back]

      
      
     style(9)

HISTORY    [Toc]    [Back]

     The intro section manual page appeared in FreeBSD 2.2.


FreeBSD 5.2.1		       December 13, 1995		 FreeBSD 5.2.1
[ Back ]
 Similar pages
Name OS Title
altq NetBSD kernel interfaces for manipulating output queues on network interfaces
altq OpenBSD kernel interfaces for manipulating output queues on network interfaces
ifqueue FreeBSD kernel interfaces for manipulating network interfaces
ifaddr FreeBSD kernel interfaces for manipulating network interfaces
if_data FreeBSD kernel interfaces for manipulating network interfaces
ifnet FreeBSD kernel interfaces for manipulating network interfaces
intro OpenBSD introduction to the kernel internals
intro NetBSD introduction to kernel internals
kconfig HP-UX introduction to kernel configuration commands
sys_attrs Tru64 introduction to kernel subsystem attributes used for configuration and tuning
Copyright © 2004-2005 DeniX Solutions SRL
newsletter delivery service