|
|
DataMuseum.dkPresents historical artifacts from the history of: RC9000 |
This is an automatic "excavation" of a thematic subset of
See our Wiki for more about RC9000 Excavated with: AutoArchaeologist - Free & Open Source Software. |
top - downloadIndex: @ T p
Length: 5153 (0x1421)
Types: TextFile
Notes: @(#)param.h 13.4 (RC International) 91/07/10 */
Names: »param.h«
└─⟦50656ff4a⟧ Bits:30010538 TX 3.1 Coldstart
└─⟦bbf173f5c⟧ »0004«
└─⟦this⟧ »./bsd/usr/include/sys/param.h«
/* @(#)param.h 13.4 (RC International) 91/07/10 */ #ifndef _PARAM_H #define _PARAM_H /* * Machine type dependent parameters. */ #include <rc/param.h> #define NPTEPG (NBPG/(sizeof (struct pte))) /* * Machine-independent constants */ #define MAXLPID 30000 /* max local process id */ #define NMOUNT 15 /* number of mountable file systems */ #define MAXUPRC 50 /* max processes per user */ #define NOFILE 256 /* max # of open files, from limits.h */ #define NCARGS 10240 /* # chars in exec arglist, from limits.h */ #define NGROUPS 8 /* max number of groups, from limits.h */ #define NOGROUP -1 /* marker for empty group set member */ #ifndef NZERO #define NZERO 20 /* default process priority */ #endif /* NZERO */ /* * Priorities */ #define PSWP 0 #define PINOD 10 #define PTXQ 15 #define PRIBIO 20 #define PRIUBA 24 #define PZERO 25 #define PPIPE 26 #define PWAIT 30 #define PLOCK 35 #define PSLEP 40 #define PUSER 50 /* * SYSV */ #define PMASK 0177 #define PCATCH 0400 /* * Signals */ #include <signal.h> #define ISSIG(p) \ ((p)->p_cursig || ((p)->p_sig && ((p)->p_flag&STRC || \ ((p)->p_sig &~ ((p)->p_sigignore | (p)->p_sigmask))) && issig())) #define TESTSIG(p) \ ((p)->p_cursig || ((p)->p_sig && ((p)->p_flag&STRC || \ ((p)->p_sig &~ ((p)->p_sigignore | (p)->p_sigmask))) && testsig())) /* * Fundamental constants of the implementation. */ #define NBBY 8 /* number of bits in a byte, from limits.h */ #ifdef LANGUAGE_C #define NBPW sizeof(int) /* number of bytes in an integer */ #else #define NBPW 4 #endif #ifndef NULL #define NULL 0 #endif /* NULL */ #define CMASK 0 /* default mask for file creation */ #define NODEV (dev_t)(-1) /* * 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. * * NOTE: SSIZE, SINCR and UPAGES must be multiples of CLSIZE */ #define CLBYTES (CLSIZE*NBPG) #define CLOFSET (CLSIZE*NBPG-1) /* for clusters, like PGOFSET */ #define claligned(x) ((((int)(x))&CLOFSET)==0) #define CLOFF CLOFSET #define CLSHIFT (PGSHIFT+CLSIZELOG2) #define btocl(addr) (((int)(addr) >> CLSHIFT) * CLSIZE) #if CLSIZE==1 #define clbase(i) (i) #define clrnd(i) (i) #define for_CLSIZE(x) (x)=0; #else /* 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)) #define for_CLSIZE(x) for ((x) = 0; (x) < CLSIZE; (x)++) #endif /* C-list buffers (c-blocks); size must be power of 2 */ #define CBLOCK 64 #define CBQSIZE (CBLOCK/NBBY) /* quote bytes/cblock */ #define CBSIZE (CBLOCK - sizeof(struct cblock *) - CBQSIZE) /* chars/cblock */ #define CROUND (CBLOCK-1) /* modulo CBLOCK address mask */ #ifdef LANGUAGE_C #include <sys/types.h> #endif /* * File system parameters and macros. * * The file system is made out of blocks of MAXBSIZE units. * MAXBSIZE primarily determines the size of buffers in the * buffer pool. * * Note that the blocked devices are assumed to have DEV_BSIZE * "sectors". * Block devices are read in BLKDEV_IOSIZE units. This number must * be a power of two and in the range of * DEV_BSIZE <= BLKDEV_IOSIZE <= MAXBSIZE */ #define MINBUFS 16 /* minimum # buffers */ #define MAXSWBUFS 256 /* maximum # swap buffer headers */ #define MAXBPERCENT 10 /* maximum percentage of physical * memory to allocate to buffers */ #define MAXBSIZE 1024 #define DEV_BSIZE 1024 #define DEV_BSHIFT 10 /* log2(DEV_BSIZE) */ #define BLKDEV_IOSIZE 1024 #define btodb(bytes) /* calculates (bytes / DEV_BSIZE) */ \ ((unsigned)(bytes) >> DEV_BSHIFT) #define dbtob(db) /* calculates (db * DEV_BSIZE) */ \ ((unsigned)(db) << DEV_BSHIFT) #define blkaligned(x) ((((int)(x))&(DEV_BSIZE-1)) == 0) /* * MAXPATHLEN defines the longest permissable path length * after expanding symbolic links. It is used to allocate * a temporary buffer from the buffer pool in which to do the * name expansion, hence should be a power of two, and must * be less than or equal to MAXBSIZE. * 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 255 #define MAXSYMLINKS 64 /* * bit map related macros */ #define setbit(a,i) ((a)[(i)/NBBY] |= 1<<((i)%NBBY)) #define clrbit(a,i) ((a)[(i)/NBBY] &= ~(1<<((i)%NBBY))) #define isset(a,i) ((a)[(i)/NBBY] & (1<<((i)%NBBY))) #define isclr(a,i) (((a)[(i)/NBBY] & (1<<((i)%NBBY))) == 0) /* * bit manipulating within a word */ #define setbitinw(w, i) ((w) |= 1<<(i)) #define clrbitinw(w, i) ((w) &= ~(1<<(i))) #define isbitsetinw(w, i) ((w) & (1<<(i))) #define isbitclrinw(w, i) (((w) & (1<<(i))) == 0) /* * Macros for fast min/max. */ #define MIN(a,b) (((a)<(b))?(a):(b)) #define MAX(a,b) (((a)>(b))?(a):(b)) /* * Macros for counting and rounding. */ #define howmany(x, y) (((x)+((y)-1))/(y)) #define roundup(x, y) ((((x)+((y)-1))/(y))*(y)) #endif /* _PARAM_H */