xref: /netbsd-src/share/man/man3/param.3 (revision 76c7fc5f6b13ed0b1508e6b313e88e59977ed78e)
1.\" $NetBSD: param.3,v 1.4 2011/04/10 10:02:34 jruoho Exp $
2.\"
3.\" Copyright (c) 2011 Jukka Ruohonen <jruohonen@iki.fi>
4.\" All rights reserved.
5.\"
6.\" Redistribution and use in source and binary forms, with or without
7.\" modification, are permitted provided that the following conditions
8.\" are met:
9.\" 1. Redistributions of source code must retain the above copyright
10.\"    notice, this list of conditions and the following disclaimer.
11.\" 2. Redistributions in binary form must reproduce the above copyright
12.\"    notice, this list of conditions and the following disclaimer in the
13.\"    documentation and/or other materials provided with the distribution.
14.\"
15.\" THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
16.\" ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
17.\" TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
18.\" PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
19.\" BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
20.\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
21.\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
22.\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
23.\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
24.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
25.\" POSSIBILITY OF SUCH DAMAGE.
26.\"
27.Dd April 10, 2011
28.Dt PARAM 3
29.Os
30.Sh NAME
31.Nm param
32.Nd common parameters
33.Sh SYNOPSIS
34.In sys/param.h
35.Ft size
36.Fn MAX "size a" "size b"
37.Ft size
38.Fn MIN "size a" "size b"
39.Sh DESCRIPTION
40The
41.In sys/param.h
42header includes some common definitions and macros specific to
43.Nx .
44The header is perhaps best characterized as a kernel equivalent of
45.In sys/types.h .
46The following list summarizes the provided definitions and macros.
47.Bl -bullet -offset indent
48.It
49First and foremost, the header defines the version of
50.Nx .
51This is defined as
52.Bd -literal -offset indent
53#define __NetBSD_Version__    599004800   /* 5.99.48 */
54.Ed
55.Pp
56The general format is
57.Dq MMmmrrpp00 ,
58where
59.Sq MM
60and
61.Sq mm
62denote the major and minor version, respectively,
63.Sq rr
64is provided for compatibility, and
65.Sq pp
66defines the patch level.
67.It
68Common utility macros such as
69.Fn MAX
70and
71.Fn MIN
72as well as more specific macros such as
73.Xr STACK 9 ,
74.Xr ctod 9 ,
75.Xr mstohz 9 ,
76.Xr roundup 9 ,
77and
78.Xr setbit 9 .
79.It
80Numerous miscellaneous definitions such as limits,
81constants for the kernel
82.Xr memoryallocators 9 ,
83scale factors used by the scheduler,
84.Xr kthread 9
85priorities, and many others.
86.It
87Definitions provided for historical and compatibility reasons.
88Examples range from definitions such as
89.Dq #define BSD
90to old priority levels used in the kernel.
91.El
92.Sh SEE ALSO
93.Xr bitops 3 ,
94.Xr cdefs 3 ,
95.Xr types 3 ,
96.Xr unistd 3
97.Sh HISTORY
98A
99.In param.h
100header appeared already in the
101.At v4 .
102