Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

param(3) [netbsd man page]

PARAM(3)						   BSD Library Functions Manual 						  PARAM(3)

param -- common parameters SYNOPSIS
#include <sys/param.h> size MAX(size a, size b); size MIN(size a, size b); DESCRIPTION
The <sys/param.h> header includes some common definitions and macros specific to NetBSD. The header is perhaps best characterized as a ker- nel equivalent of <sys/types.h>. The following list summarizes the provided definitions and macros. o First and foremost, the header defines the version of NetBSD. This is defined as #define __NetBSD_Version__ 599004800 /* 5.99.48 */ The general format is ``MMmmrrpp00'', where 'MM' and 'mm' denote the major and minor version, respectively, 'rr' is provided for compatibility, and 'pp' defines the patch level. o Common utility macros such as MAX() and MIN() as well as more specific macros such as STACK(9), ctod(9), mstohz(9), roundup(9), and setbit(9). o Numerous miscellaneous definitions such as limits, constants for the kernel memoryallocators(9), scale factors used by the sched- uler, kthread(9) priorities, and many others. o Definitions provided for historical and compatibility reasons. Examples range from definitions such as ``#define BSD'' to old pri- ority levels used in the kernel. SEE ALSO
bitops(3), cdefs(3), types(3), unistd(3) HISTORY
A <param.h> header appeared already in the Version 4 AT&T UNIX. BSD
April 10, 2011 BSD

Check Out this Related Man Page

ROUNDUP(9)						   BSD Kernel Developer's Manual						ROUNDUP(9)

roundup -- macros for counting and rounding SYNOPSIS
#include <sys/param.h> size howmany(x, size); size roundup(x, size); size rounddown(x, size); size roundup2(x, size); int powerof2(x); DESCRIPTION
The roundup() and rounddown() macros return an integer from rounding x up and down, respectively, to the next size. The howmany() macro in turn reveals how many times size fits into x, rounding the residual up. The roundup2() macro also rounds up, but with the assumption that size is a power of two. If x is indeed a power of two, powerof2() return 1. RETURN VALUES
The return value is an integer from the respective operation. If x is 0, all macros except powerof2() return 0. The behavior is undefined if size is 0. EXAMPLES
The following example rounds the variable rx to a 32-bit boundary: uint16_t rx; ... rx = roundup2(rx, sizeof(uint32_t)); SEE ALSO
ilog2(3), param(3), imax(9) CAVEATS
All described macros make no assumptions about the type of the parameters. These are implicitly assumed to be unsigned integers. BSD
June 1, 2011 BSD
Man Page

4 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

order by size

Hi all, I want to do a command that list all files from a directory e subdirectories order by size (MAX to MIN) Can you help me? Tkz (2 Replies)
Discussion started by: sliver
2 Replies

2. Programming

Where are the library function definitions located?

Hi friends, I hope everyone is doing fine. I have this confusion, hope you can help me out with it. The header files contain only function prototypes. Where are the function definitions located. For example, if I would like to see how printf works, where can I see its definition, stdio.h only... (2 Replies)
Discussion started by: gabam
2 Replies

3. Programming

Problem in C

A structure is there with , #define MAX 2000 struct my_struct{ char a; char b; char c; } I need to extract 4 file's content. So, a function has some task to open the file and extract the content's in it and store each file's data into each character array in the structure. The... (1 Reply)
Discussion started by: gameboy87
1 Replies

4. UNIX for Dummies Questions & Answers

Integrate MIN and MAX in a string

I need to use awk for this task ! input (fields are separated by ";"): 1%2%3%4%;AA 5%6%7%8%9;AA 1%2%3%4%5%6;BB 7%8%9%10%11%12;BBIn the 1st field there are patterns composed of numbers separated by "%". The 2nd field define groups (here two different groups called "AA" and "BB"). Records... (8 Replies)
Discussion started by: beca123456
8 Replies