Deleted Added
full compact
intro.9 (12823) intro.9 (13744)
1.\" Copyright (c) 1983, 1991, 1993
2.\" The Regents of the University of California. All rights reserved.
3.\"
4.\" Redistribution and use in source and binary forms, with or without
5.\" modification, are permitted provided that the following conditions
6.\" are met:
7.\" 1. Redistributions of source code must retain the above copyright
8.\" notice, this list of conditions and the following disclaimer.

--- 68 unchanged lines hidden (view full) ---

77If a function is meant as a debugging aid in DDB, it should be enclosed
78in
79.Bd -literal -offset indent
80#ifdef DDB
81
82#endif /* DDB */
83.Ed
84
1.\" Copyright (c) 1983, 1991, 1993
2.\" The Regents of the University of California. All rights reserved.
3.\"
4.\" Redistribution and use in source and binary forms, with or without
5.\" modification, are permitted provided that the following conditions
6.\" are met:
7.\" 1. Redistributions of source code must retain the above copyright
8.\" notice, this list of conditions and the following disclaimer.

--- 68 unchanged lines hidden (view full) ---

77If a function is meant as a debugging aid in DDB, it should be enclosed
78in
79.Bd -literal -offset indent
80#ifdef DDB
81
82#endif /* DDB */
83.Ed
84
85And the name of the procedure shoule start with the prefix
85And the name of the procedure should start with the prefix
86.Li DDB_
87to clearly identify the procedure as a debugger routine.
88.El
89
90
91.Sh SCOPE OF SYMBOLS
92It is important to carefully consider the scope of symbols in the kernel.
93The default is to make everything static, unless some reason requires
94the opposite.
95
96There are several reasons for this policy,
97the main one is that the kernel is one monolithic name-space,
86.Li DDB_
87to clearly identify the procedure as a debugger routine.
88.El
89
90
91.Sh SCOPE OF SYMBOLS
92It is important to carefully consider the scope of symbols in the kernel.
93The default is to make everything static, unless some reason requires
94the opposite.
95
96There are several reasons for this policy,
97the main one is that the kernel is one monolithic name-space,
98and polution is not a good idea here either.
98and pollution is not a good idea here either.
99
100For device drivers and other modules that don't add new internal interfaces
101to the kernel, the entire source should be in one file it possible.
102That way all symbols can be made static.
103
104If for some reason a module is split over multiple source files, then try
105to split the module along some major fault-line and consider using the
106number of global symbols as your guide.
107The fewer the better.
108
109.Sh HISTORY
110The
111.Nm intro
112section manual page appeared in FreeBSD 2.2
99
100For device drivers and other modules that don't add new internal interfaces
101to the kernel, the entire source should be in one file it possible.
102That way all symbols can be made static.
103
104If for some reason a module is split over multiple source files, then try
105to split the module along some major fault-line and consider using the
106number of global symbols as your guide.
107The fewer the better.
108
109.Sh HISTORY
110The
111.Nm intro
112section manual page appeared in FreeBSD 2.2