param.h revision 7c478bd95313f5f23a4c958a745db2134aa03244
/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License, Version 1.0 only
* (the "License"). You may not use this file except in compliance
* with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* See the License for the specific language governing permissions
* and limitations under the License.
*
* When distributing Covered Code, include this CDDL HEADER in each
* file and include the License file at usr/src/OPENSOLARIS.LICENSE.
* If applicable, add the following below this CDDL HEADER, with the
* fields enclosed by brackets "[]" replaced with your own identifying
* information: Portions Copyright [yyyy] [name of copyright owner]
*
* CDDL HEADER END
*/
/*
* Copyright 1989 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
#pragma ident "%Z%%M% %I% %E% SMI"
#ifndef __sys_param_h
#define __sys_param_h
/*
* Machine type dependent parameters.
*/
/*
* Machine-independent constants
*/
#define VDISABLE 0 /* use this to turn off c_cc[i] */
#ifndef KERNEL
/*
* return values just in ticks; but not for getrusage(), which returns
* values in ticks*pages. HZ *must* be 60 for compatibility reasons.
*/
#define HZ 60
#endif
#ifdef KERNEL
/*
* Priorities
*/
#define PMASK 0177
#define PSWP 0
#define PINOD 10
#define PAMAP 10
#define PRIBIO 20
#define PRIUBA 24
#define PZERO 25
#define PPIPE 26
#define PVFS 27
#define PWAIT 30
#define PLOCK 35
#define PSLEP 40
#ifdef VPIX
#define PV86 41
#endif
#define PUSER 50
#define NZERO 20
#endif /* KERNEL */
/*
* Signals
*/
#define NBPW sizeof (int) /* number of bytes in an integer */
#ifndef NULL
#define NULL 0
#endif
#define CMASK 0 /* default mask for file creation */
#ifndef INTRLVE
/* macros replacing interleaving functions */
#endif
#endif
/*
* File system parameters and macros.
*
* The file system is made out of blocks of at most MAXBSIZE units,
* with smaller units (fragments) only in the last direct block.
* MAXBSIZE primarily determines the size of buffers in the buffer
* pool. It may be made larger without any effect on existing
* file systems; however making it smaller make make some file
* systems unmountable.
*
* Note that the blocked devices are assumed to have DEV_BSIZE
* "sectors" and that fragments must be some multiple of this size.
*/
#define MAXBSIZE 8192
#define DEV_BSIZE 512
#define MAXFRAG 8
((unsigned)(bytes) >> DEV_BSHIFT)
((unsigned)(db) << DEV_BSHIFT)
/*
* Map a ``block device block'' to a file system block.
* XXX - this is currently only being used for tape drives.
*/
#define BLKDEV_IOSIZE 2048
/*
* MAXPATHLEN defines the longest permissable path length,
* including the terminating null, after expanding symbolic links.
* MAXSYMLINKS defines the maximum number of symbolic links
* that may be expanded in a path name. It should be set high
* enough to allow all legitimate uses, but halt infinite loops
* reasonably quickly.
*/
#define MAXPATHLEN 1024
#define MAXSYMLINKS 20
/*
* bit map related macros
*/
/*
*/
#ifndef MIN
#define MIN(a,b) (((a)<(b))?(a):(b))
#endif
#ifndef MAX
#define MAX(a,b) (((a)>(b))?(a):(b))
#endif
/*
* Macros for counting and rounding.
*/
#ifdef sun386
#else
#define howmany(x, y) (((x)+((y)-1))/(y))
#define roundup(x, y) ((((x)+((y)-1))/(y))*(y))
#endif
/*
* Scale factor for scaled integers used to count
* %cpu time and load averages.
*/
/*
* Maximum size of hostname recognized and stored in the kernel.
*/
#define MAXHOSTNAMELEN 64
#endif /* !__sys_param_h */