1: /*
   2:  * Copyright (c) 1982, 1986 Regents of the University of California.
   3:  * All rights reserved.  The Berkeley software License Agreement
   4:  * specifies the terms and conditions for redistribution.
   5:  *
   6:  *	@(#)machparam.h	7.1 (Berkeley) 6/5/86
   7:  */
   8: 
   9: /*
  10:  * Machine dependent constants for vax.
  11:  */
  12: #define NBPG    512     /* bytes/page */
  13: #define PGOFSET (NBPG-1)    /* byte offset into page */
  14: #define PGSHIFT 9       /* LOG2(NBPG) */
  15: 
  16: #define CLSIZE      2
  17: #define CLSIZELOG2  1
  18: 
  19: #define SSIZE   4       /* initial stack size/NBPG */
  20: #define SINCR   4       /* increment of stack/NBPG */
  21: 
  22: #define UPAGES  10      /* pages of u-area */
  23: 
  24: /*
  25:  * Some macros for units conversion
  26:  */
  27: /* Core clicks (512 bytes) to segments and vice versa */
  28: #define ctos(x) (x)
  29: #define stoc(x) (x)
  30: 
  31: /* Core clicks (512 bytes) to disk blocks */
  32: #define ctod(x) (x)
  33: #define dtoc(x) (x)
  34: #define dtob(x) ((x)<<9)
  35: 
  36: /* clicks to bytes */
  37: #define ctob(x) ((x)<<9)
  38: 
  39: /* bytes to clicks */
  40: #define btoc(x) ((((unsigned)(x)+511)>>9))
  41: 
  42: /*
  43:  * Macros to decode processor status word.
  44:  */
  45: #define USERMODE(ps)    (((ps) & PSL_CURMOD) == PSL_CURMOD)
  46: #define BASEPRI(ps) (((ps) & PSL_IPL) == 0)
  47: 
  48: #ifdef KERNEL
  49: #ifndef LOCORE
  50: int cpuspeed;
  51: #endif
  52: #define DELAY(n)    { register int N = cpuspeed * (n); while (--N > 0); }
  53: 
  54: #else KERNEL
  55: #define DELAY(n)    { register int N = (n); while (--N > 0); }
  56: #endif KERNEL

Defined variables

cpuspeed defined in line 50; used 1 times
  • in line 52

Defined macros

BASEPRI defined in line 46; never used
CLSIZE defined in line 16; used 6 times
CLSIZELOG2 defined in line 17; used 1 times
DELAY defined in line 55; never used
NBPG defined in line 12; used 4 times
PGOFSET defined in line 13; never used
PGSHIFT defined in line 14; used 1 times
SINCR defined in line 20; never used
SSIZE defined in line 19; never used
UPAGES defined in line 22; never used
USERMODE defined in line 45; never used
btoc defined in line 40; never used
ctob defined in line 37; never used
ctod defined in line 32; never used
ctos defined in line 28; never used
dtob defined in line 34; never used
dtoc defined in line 33; never used
stoc defined in line 29; never used
Last modified: 1986-06-05
Generated: 2016-12-26
Generated by src2html V0.67
page hit count: 869
Valid CSS Valid XHTML 1.0 Strict