|
|
Power 6/32 Unix version 1.2b
/* param.h 4.12 81/06/11 */
/* Tahoe version 1.0 Nov 5 1982 */
/*
* Tunable variables which do not usually vary per system.
*
* The sizes of most system tables are configured
* into each system description. The file system buffer
* cache size is assigned based on available memory.
* The tables whose sizes don't vary often are given here.
*/
#define NMOUNT 15 /* number of mountable file systems */
#define MSWAPX 15 /* pseudo mount table index for swapdev */
#define MAXUPRC 25 /* max processes per user */
#define SSIZE 2 /* initial stack size (*1024 bytes) */
#define SINCR 2 /* increment of stack (*1024 bytes) */
#define NOFILE 20 /* max open files per process */
/* NOFILE MUST NOT BE >= 31; SEE pte.h */
#define CANBSIZ 256 /* max size of typewriter line */
#define NCARGS 10240 /* # characters in exec arglist */
/*
* priorities
* probably should not be
* altered too much
*/
#define PSWP 0
#define PINOD 10
#define PRIBIO 20
#define PRIUBA 24
#define PZERO 25
#define PPIPE 26
#define PWAIT 30
#define PSLEP 40
#define PUSER 50
#define NZERO 20
/*
* signals
* dont change
*/
#ifndef NSIG
#include <signal.h>
#endif
/*
* Return values from tsleep().
*/
#define TS_OK 0 /* normal wakeup */
#define TS_TIME 1 /* timed-out wakeup */
#define TS_SIG 2 /* asynchronous signal wakeup */
/*
* fundamental constants of the implementation--
* cannot be changed easily.
*/
#define NBBY 8 /* number of bits in a byte */
#define NBPW sizeof(int) /* number of bytes in an integer */
#define NBPG 1024
#define PGOFSET (NBPG-1) /* byte offset into page */
#define PGSHIFT 10 /* LOG2(NBPG) */
#define IOBASE 0xfff00000 /* Last Megabyte of 4 giga */
/* corresponds to Versabus addresses */
/*
* The following constant is used to initialize the map of the
* system page table i/o entries.
* It's value should be the highest i/o address used by all the
* controllers handled in the system as specified in ubminit
* structure in ioconf.c.
*/
/* #define MAXIOADDR 0xffff4001 /* highest physical io address */
#define MAXIOADDR 0xffffb03c /* While we are checking performance ! */
/* Number of entries in the system page pable for i/o space */
#define IOSIZE (( (MAXIOADDR - IOBASE+ NBPG -1) >> PGSHIFT )+1)
#define UPAGES 4 /* pages of u-area */
#define NULL 0
#define CMASK 0 /* default mask for file creation */
#define NODEV (dev_t)(-1)
#define ROOTINO ((ino_t)2) /* i number of all roots */
#define SUPERB ((daddr_t)1) /* block number of the super block */
#define DIRSIZ 14 /* max characters per directory */
/*
* Clustering of hardware pages on machines with ridiculously small
* page sizes is done here. The paging subsystem deals with units of
* CLSIZE pte's describing NBPG (from vm.h) pages each... BSIZE must
* be CLSIZE*NBPG in the current implementation, that is the paging subsystem
* deals with the same size blocks that the file system uses.
*
* NOTE: SSIZE, SINCR and UPAGES must be multiples of CLSIZE
*/
#define CLSIZE 1
#define CLOFSET (CLSIZE*NBPG-1) /* for clusters, like PGOFSET */
/* give the base virtual address (first of CLSIZE) */
#define clbase(i) ((i) &~ (CLSIZE-1))
/* round a number of clicks up to a whole cluster */
#define clrnd(i) (((i) + (CLSIZE-1)) &~ (CLSIZE-1))
#if CLSIZE==1
#define BSIZE 1024
#define INOPB 16
#define BMASK 01777
#define BSHIFT 10
#define NMASK 0377
#define NSHIFT 8
#define NICINOD 100
#define NICFREE 178
#endif
#ifndef INTRLVE
/* macros replacing interleaving functions */
#define dkblock(bp) ((bp)->b_blkno)
#define dkunit(bp) (minor((bp)->b_dev) >> 3)
#endif
/* inumber to disk address and inumber to disk offset */
#define itod(x) ((daddr_t)((((unsigned)(x)+2*INOPB-1)/INOPB)))
#define itoo(x) ((int)(((x)+2*INOPB-1)%INOPB))
/* file system blocks to disk blocks and back */
#define fsbtodb(b) ((b)*CLSIZE)
#define dbtofsb(b) ((b)/CLSIZE)
#define NINDIR (BSIZE/sizeof(daddr_t)) /* # of pointers in indirect block */
#define CBSIZE 28 /* number of chars in a clist block */
#define CROUND 0x1F /* clist rounding; sizeof(int *) + CBSIZE -1*/
/*
* Macros for fast min/max
*/
#define MIN(a,b) (((a)<(b))?(a):(b))
#define MAX(a,b) (((a)>(b))?(a):(b))
/*
* Some macros for units conversion
*/
/* Core clicks (1024 bytes) to segments and vice versa */
#define ctos(x) (x)
#define stoc(x) (x)
/* Core clicks (1024 bytes) to disk blocks */
#define ctod(x) (x)
/* clicks to bytes */
#define ctob(x) ((x) << PGSHIFT)
/* bytes to clicks */
#define btoc(x) ((((unsigned)(x)+ NBPG -1) >> PGSHIFT))
#ifndef KERNEL
#include <sys/types.h>
#else
#include "types.h"
#endif
/*
* Machine-dependent bits and macros
*/
#define UMODE PSL_CURMOD /* usermode bits */
#define USERMODE(ps) (((ps) & UMODE) == UMODE)
#define BASEPRI(ps) (((ps) & PSL_IPL) != 0)
/*
* Provide about n microseconds of delay
*/
#define DELAY(n) { register int N = 3*(n); while (--N > 0); }
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.