Source-Changes-HG archive

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

[src/trunk]: src Briefly summarize <sys/param.h>.



details:   https://anonhg.NetBSD.org/src/rev/28e8078bd783
branches:  trunk
changeset: 763938:28e8078bd783
user:      jruoho <jruoho%NetBSD.org@localhost>
date:      Fri Apr 08 07:47:42 2011 +0000

description:
Briefly summarize <sys/param.h>.

diffstat:

 distrib/sets/lists/comp/mi |    5 +-
 share/man/man3/Makefile    |    6 +-
 share/man/man3/param.3     |  100 +++++++++++++++++++++++++++++++++++++++++++++
 3 files changed, 108 insertions(+), 3 deletions(-)

diffs (164 lines):

diff -r 3789c65c697f -r 28e8078bd783 distrib/sets/lists/comp/mi
--- a/distrib/sets/lists/comp/mi        Fri Apr 08 06:55:14 2011 +0000
+++ b/distrib/sets/lists/comp/mi        Fri Apr 08 07:47:42 2011 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: mi,v 1.1609 2011/04/06 05:40:18 jruoho Exp $
+#      $NetBSD: mi,v 1.1610 2011/04/08 07:47:42 jruoho Exp $
 #
 # Note: don't delete entries from here - mark them as "obsolete" instead.
 #
@@ -7594,6 +7594,7 @@
 ./usr/share/man/cat3/pam_verror.0              comp-c-catman           .cat,pam
 ./usr/share/man/cat3/pam_vinfo.0               comp-c-catman           .cat,pam
 ./usr/share/man/cat3/pam_vprompt.0             comp-c-catman           .cat,pam
+./usr/share/man/cat3/param.0                   comp-c-catman           .cat
 ./usr/share/man/cat3/parsedate.0               comp-c-catman           .cat
 ./usr/share/man/cat3/paths.0                   comp-c-catman           .cat
 ./usr/share/man/cat3/pause.0                   comp-c-catman           .cat
@@ -13636,6 +13637,7 @@
 ./usr/share/man/html3/pam_verror.html          comp-c-htmlman          html,pam
 ./usr/share/man/html3/pam_vinfo.html           comp-c-htmlman          html,pam
 ./usr/share/man/html3/pam_vprompt.html         comp-c-htmlman          html,pam
+./usr/share/man/html3/param.html               comp-c-htmlman          html
 ./usr/share/man/html3/parsedate.html           comp-c-htmlman          html
 ./usr/share/man/html3/paths.html               comp-c-htmlman          html
 ./usr/share/man/html3/pause.html               comp-c-htmlman          html
@@ -19670,6 +19672,7 @@
 ./usr/share/man/man3/pam_verror.3              comp-c-man              .man,pam
 ./usr/share/man/man3/pam_vinfo.3               comp-c-man              .man,pam
 ./usr/share/man/man3/pam_vprompt.3             comp-c-man              .man,pam
+./usr/share/man/man3/param.3                   comp-c-man              .man
 ./usr/share/man/man3/parsedate.3               comp-c-man              .man
 ./usr/share/man/man3/paths.3                   comp-c-man              .man
 ./usr/share/man/man3/pause.3                   comp-c-man              .man
diff -r 3789c65c697f -r 28e8078bd783 share/man/man3/Makefile
--- a/share/man/man3/Makefile   Fri Apr 08 06:55:14 2011 +0000
+++ b/share/man/man3/Makefile   Fri Apr 08 07:47:42 2011 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: Makefile,v 1.71 2011/03/30 10:06:59 jruoho Exp $
+#      $NetBSD: Makefile,v 1.72 2011/04/08 07:47:42 jruoho Exp $
 #      @(#)Makefile    8.2 (Berkeley) 12/13/93
 
 MAN=   _DIAGASSERT.3 __CONCAT.3 __UNCONST.3 CMSG_DATA.3 \
@@ -10,7 +10,7 @@
        cdefs.3 dirent.3 dlfcn.3 dl_iterate_phdr.3 end.3 \
        fast_divide32.3 ffs32.3 gcq.3 \
        ilog2.3 intro.3 inttypes.3 iso646.3 \
-       makedev.3 offsetof.3 paths.3 queue.3 rbtree.3 sigevent.3 \
+       makedev.3 offsetof.3 param.3 paths.3 queue.3 rbtree.3 sigevent.3 \
        stdarg.3 stdbool.3 stddef.3 stdint.3 stdlib.3 sysexits.3 \
        tgmath.3 timeradd.3 timeval.3 tree.3 typeof.3 types.3 varargs.3
 
@@ -225,6 +225,8 @@
        rbtree.3 rb_tree_iterate.3
 MLINKS+=stdarg.3 va_arg.3 stdarg.3 va_copy.3 \
        stdarg.3 va_end.3 stdarg.3 va_start.3
+MLINKS+=param.3 MAX.3 \
+       param.3 MIN.3
 MLINKS+=dirent.3 dir.3 \
        dirent.3 IFTODT.3 \
        dirent.3 DTTOIF.3
diff -r 3789c65c697f -r 28e8078bd783 share/man/man3/param.3
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/share/man/man3/param.3    Fri Apr 08 07:47:42 2011 +0000
@@ -0,0 +1,100 @@
+.\" $NetBSD: param.3,v 1.1 2011/04/08 07:47:42 jruoho Exp $
+.\"
+.\" Copyright (c) 2011 Jukka Ruohonen <jruohonen%iki.fi@localhost>
+.\" All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\"    notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\"    notice, this list of conditions and the following disclaimer in the
+.\"    documentation and/or other materials provided with the distribution.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
+.\" ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+.\" TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+.\" PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
+.\" BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+.\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+.\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+.\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+.\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+.\" POSSIBILITY OF SUCH DAMAGE.
+.\"
+.Dd April 8, 2011
+.Dt PARAM 3
+.Os
+.Sh NAME
+.Nm param
+.Nd common parameters
+.Sh SYNOPSIS
+.In sys/param.h
+.Ft size
+.Fn MAX "size a" "size b"
+.Ft size
+.Fn MIN "size a" "size b"
+.Sh DESCRIPTION
+The
+.In sys/param.h
+header includes some common definitions and macros specific to
+.Nx .
+The header is perhaps best characterized as a kernel equivalent of
+.In sys/types.h .
+The following list summarizes the provided definitions and macros.
+.Bl -bullet -offset indent
+.It
+First and foremost, the header defines the version of
+.Nx .
+This is defined as
+.Bd -literal -offset indent
+#define __NetBSD_Version__    599004800   /* 5.99.48 */
+.Ed
+.Pp
+The general format is
+.Dq MMmmrrpp00 ,
+where
+.Sq MM
+and
+.Sq mm
+denote the major and minor version, respectively,
+.Sq rr
+is provided for compatibility, and
+.Sq pp
+defines the patch level.
+.It
+Common utility macros such as
+.Fn MAX
+and
+.Fn MIN
+as well as more specific macros such as
+.Xr STACK 9 ,
+.Xr ctod 9 ,
+.Xr mstohz 9 ,
+.Xr roundup 9 ,
+and
+.Xr setbit 9 .
+.It
+Numerous miscellaneous definitions such as limits,
+constants for the kernel
+.Xr memoryallocators 9 ,
+scale factors used by the scheduler,
+.Xr kthread 9
+priorities, and many others.
+.It
+Definitions provided for historical and compatibility reasons.
+Examples range from definitions such as
+.Dq #define BSD
+to old priority levels used in the kernel.
+.Ed
+.El
+.Sh SEE ALSO
+.Xr cdefs 3 ,
+.Xr types 3
+.Sh HISTORY
+A
+.In param.h
+header appeared already in the
+.At v4 .



Home | Main Index | Thread Index | Old Index