xref: /csrg-svn/sys/vax/include/param.h (revision 9118)
1*9118Ssam /*	param.h	4.1	82/11/09	*/
2*9118Ssam 
3*9118Ssam /*
4*9118Ssam  * Machine dependent constants for vax.
5*9118Ssam  */
6*9118Ssam #define	NBPG	512		/* bytes/page */
7*9118Ssam #define	PGOFSET	(NBPG-1)	/* byte offset into page */
8*9118Ssam #define	PGSHIFT	9		/* LOG2(NBPG) */
9*9118Ssam 
10*9118Ssam #define	CLSIZE		2
11*9118Ssam #define	CLSIZELOG2	1
12*9118Ssam 
13*9118Ssam #define	SSIZE	4		/* initial stack size/NBPG */
14*9118Ssam #define	SINCR	4		/* increment of stack/NBPG */
15*9118Ssam 
16*9118Ssam #define	UPAGES	8		/* pages of u-area */
17*9118Ssam 
18*9118Ssam /*
19*9118Ssam  * Some macros for units conversion
20*9118Ssam  */
21*9118Ssam /* Core clicks (512 bytes) to segments and vice versa */
22*9118Ssam #define	ctos(x)	(x)
23*9118Ssam #define	stoc(x)	(x)
24*9118Ssam 
25*9118Ssam /* Core clicks (512 bytes) to disk blocks */
26*9118Ssam #define	ctod(x)	(x)
27*9118Ssam #define	dtoc(x)	(x)
28*9118Ssam #define	dtob(x)	((x)<<9)
29*9118Ssam 
30*9118Ssam /* clicks to bytes */
31*9118Ssam #define	ctob(x)	((x)<<9)
32*9118Ssam 
33*9118Ssam /* bytes to clicks */
34*9118Ssam #define	btoc(x)	((((unsigned)(x)+511)>>9))
35*9118Ssam 
36*9118Ssam /*
37*9118Ssam  * Macros to decode processor status word.
38*9118Ssam  */
39*9118Ssam #define	USERMODE(ps)	(((ps) & PSL_CURMOD) == PSL_CURMOD)
40*9118Ssam #define	BASEPRI(ps)	(((ps) & PSL_IPL) != 0)
41*9118Ssam 
42*9118Ssam #define	DELAY(n)	{ register int N = (n); while (--N > 0); }
43