h/param.h

00150 /* 00151 * tunable variables 00152 */ 00153 00154 #define NBUF 29 /* size of buffer cache */ 00155 #define NINODE 200 /* number of in core inodes */ 00156 #define NFILE 175 /* number of in core file structures */ 00157 #define NMOUNT 8 /* number of mountable file systems */ 00158 #define MAXMEM (64*32) /* max core per process - first # is Kw */ 00159 #define MAXUPRC 25 /* max processes per user */ 00160 #define SSIZE 20 /* initial stack size (*64 bytes) */ 00161 #define SINCR 20 /* increment of stack (*64 bytes) */ 00162 #define NOFILE 20 /* max open files per process */ 00163 #define CANBSIZ 256 /* max size of typewriter line */ 00164 #define CMAPSIZ 50 /* size of core allocation area */ 00165 #define SMAPSIZ 50 /* size of swap allocation area */ 00166 #define NCALL 20 /* max simultaneous time callouts */ 00167 #define NPROC 150 /* max number of processes */ 00168 #define NTEXT 40 /* max number of pure texts */ 00169 #define NCLIST 100 /* max total clist size */ 00170 #define HZ 60 /* Ticks/second of the clock */ 00171 #define TIMEZONE (5*60) /* Minutes westward from Greenwich */ 00172 #define DSTFLAG 1 /* Daylight Saving Time applies in this locality */ 00173 #define MSGBUFS 128 /* Characters saved from error messages */ 00174 #define NCARGS 5120 /* # characters in exec arglist */ 00175 00176 /* 00177 * priorities 00178 * probably should not be 00179 * altered too much 00180 */ 00181 00182 #define PSWP 0 00183 #define PINOD 10 00184 #define PRIBIO 20 00185 #define PZERO 25 00186 #define NZERO 20 00187 #define PPIPE 26 00188 #define PWAIT 30 00189 #define PSLEP 40 00190 #define PUSER 50 00191 00192 /* 00193 * signals 00194 * dont change 00195 */ 00196 00197 #define NSIG 17 00198 /* 00199 * No more than 16 signals (1-16) because they are 00200 * stored in bits in a word. 00201 */ 00202 #define SIGHUP 1 /* hangup */ 00203 #define SIGINT 2 /* interrupt (rubout) */ 00204 #define SIGQUIT 3 /* quit (FS) */ 00205 #define SIGINS 4 /* illegal instruction */ 00206 #define SIGTRC 5 /* trace or breakpoint */ 00207 #define SIGIOT 6 /* iot */ 00208 #define SIGEMT 7 /* emt */ 00209 #define SIGFPT 8 /* floating exception */ 00210 #define SIGKIL 9 /* kill, uncatchable termination */ 00211 #define SIGBUS 10 /* bus error */ 00212 #define SIGSEG 11 /* segmentation violation */ 00213 #define SIGSYS 12 /* bad system call */ 00214 #define SIGPIPE 13 /* end of pipe */ 00215 #define SIGCLK 14 /* alarm clock */ 00216 #define SIGTRM 15 /* Catchable termination */ 00217 00218 /* 00219 * fundamental constants of the implementation-- 00220 * cannot be changed easily 00221 */ 00222 00223 #define NBPW sizeof(int) /* number of bytes in an integer */ 00224 #define BSIZE 512 /* size of secondary block (bytes) */ 00225 /* BSLOP can be 0 unless you have a TIU/Spider */ 00226 #define BSLOP 2 /* In case some device needs bigger buffers */ 00227 #define NINDIR (BSIZE/sizeof(daddr_t)) 00228 #define BMASK 0777 /* BSIZE-1 */ 00229 #define BSHIFT 9 /* LOG2(BSIZE) */ 00230 #define NMASK 0177 /* NINDIR-1 */ 00231 #define NSHIFT 7 /* LOG2(NINDIR) */ 00232 #define USIZE 16 /* size of user block (*64) */ 00233 #define UBASE 0140000 /* abs. addr of user block */ 00234 #define NULL 0 00235 #define CMASK 0 /* default mask for file creation */ 00236 #define NODEV (dev_t)(-1) 00237 #define ROOTINO ((ino_t)2) /* i number of all roots */ 00238 #define SUPERB ((daddr_t)1) /* block number of the super block */ 00239 #define DIRSIZ 14 /* max characters per directory */ 00240 #define NICINOD 100 /* number of superblock inodes */ 00241 #define NICFREE 50 /* number of superblock free blocks */ 00242 #define INFSIZE 138 /* size of per-proc info for users */ 00243 #define CBSIZE 14 /* number of chars in a clist block */ 00244 #define CROUND 017 /* clist rounding: sizeof(int *) + CBSIZE - 1*/ 00245 00246 /* 00247 * Some macros for units conversion 00248 */ 00249 /* Core clicks (64 bytes) to segments and vice versa */ 00250 #define ctos(x) ((x+127)/128) 00251 #define stoc(x) ((x)*128) 00252 00253 /* Core clicks (64 bytes) to disk blocks */ 00254 #define ctod(x) ((x+7)>>3) 00255 00256 /* inumber to disk address */ 00257 #define itod(x) (daddr_t)((((unsigned)x+15)>>3)) 00258 00259 /* inumber to disk offset */ 00260 #define itoo(x) (int)((x+15)&07) 00261 00262 /* clicks to bytes */ 00263 #define ctob(x) (x<<6) 00264 00265 /* bytes to clicks */ 00266 #define btoc(x) ((((unsigned)x+63)>>6)) 00267 00268 /* major part of a device */ 00269 #define major(x) (int)(((unsigned)x>>8)) 00270 00271 /* minor part of a device */ 00272 #define minor(x) (int)(x&0377) 00273 00274 /* make a device number */ 00275 #define makedev(x,y) (dev_t)((x)<<8 | (y)) 00276 00277 typedef struct { int r[1]; } * physadr; 00278 typedef long daddr_t; 00279 typedef char * caddr_t; 00280 typedef unsigned int ino_t; 00281 typedef long time_t; 00282 typedef int label_t[6]; /* regs 2-7 */ 00283 typedef int dev_t; 00284 typedef long off_t; 00285 00286 /* 00287 * Machine-dependent bits and macros 00288 */ 00289 #define UMODE 0170000 /* usermode bits */ 00290 #define USERMODE(ps) ((ps & UMODE)==UMODE) 00291 00292 #define INTPRI 0340 /* Priority bits */ 00293 #define BASEPRI(ps) ((ps & INTPRI) != 0) 00294 00295 00296 00297 00298 00299