Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/share/man/man9 - add some random notes



details:   https://anonhg.NetBSD.org/src/rev/00f8447ca549
branches:  trunk
changeset: 761376:00f8447ca549
user:      yamt <yamt%NetBSD.org@localhost>
date:      Tue Jan 25 23:46:48 2011 +0000

description:
- add some random notes

     Basically, KASSERT() should be used for light-weight checks and
     KDASSERT() should be used for heavier ones.

     Callers should not rely on the side effects of expression because,
     depending on the kernel compile options mentioned above, expression might
     not be evaluated at all.

- Xr options(4)
- bump date

diffstat:

 share/man/man9/KASSERT.9 |  17 +++++++++++++++--
 1 files changed, 15 insertions(+), 2 deletions(-)

diffs (43 lines):

diff -r 565da0692af2 -r 00f8447ca549 share/man/man9/KASSERT.9
--- a/share/man/man9/KASSERT.9  Tue Jan 25 21:27:48 2011 +0000
+++ b/share/man/man9/KASSERT.9  Tue Jan 25 23:46:48 2011 +0000
@@ -1,4 +1,4 @@
-.\"     $NetBSD: KASSERT.9,v 1.9 2010/10/29 09:34:03 wiz Exp $
+.\"     $NetBSD: KASSERT.9,v 1.10 2011/01/25 23:46:48 yamt Exp $
 .\"
 .\" Copyright (c) 2006 Igor Sobrado
 .\" All rights reserved.
@@ -24,7 +24,7 @@
 .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 .\" POSSIBILITY OF SUCH DAMAGE.
 .\"
-.Dd October 28, 2010
+.Dd Janurary 26, 2011
 .Dt KASSERT 9
 .Os
 .Sh NAME
@@ -63,11 +63,24 @@
 vs
 .Dv DIAGNOSTIC ) .
 .Pp
+Basically,
+.Fn KASSERT
+should be used for light-weight checks and
+.Fn KDASSERT
+should be used for heavier ones.
+.Pp
+Callers should not rely on the side effects of
+.Ar expression
+because, depending on the kernel compile options mentioned above,
+.Ar expression
+might not be evaluated at all.
+.Pp
 The panic message will display the style of assertion (debugging
 vs. diagnostic), the expression that failed and the filename, and line
 number the failure happened on.
 .Sh SEE ALSO
 .Xr config 1 ,
+.Xr options 4 ,
 .Xr CTASSERT 9 ,
 .Xr panic 9 ,
 .Xr printf 9



Home | Main Index | Thread Index | Old Index