summaryrefslogtreecommitdiff
path: root/sys/arch/vax/include/param.h
diff options
context:
space:
mode:
authorMats O Jansson <maja@cvs.openbsd.org>1997-09-10 11:47:13 +0000
committerMats O Jansson <maja@cvs.openbsd.org>1997-09-10 11:47:13 +0000
commitccaf04f4bb2a93a41db1352978899ff3191f9193 (patch)
treebabab3fd533e6bdec85087b8fd342e2616556e73 /sys/arch/vax/include/param.h
parent7ee17d6b3862934e2abfa86ded9fdde7be1133ca (diff)
Sync with NetBSD 970516. -moj
Diffstat (limited to 'sys/arch/vax/include/param.h')
-rw-r--r--sys/arch/vax/include/param.h15
1 files changed, 11 insertions, 4 deletions
diff --git a/sys/arch/vax/include/param.h b/sys/arch/vax/include/param.h
index ef99aae85d8..ea2c9f5b78e 100644
--- a/sys/arch/vax/include/param.h
+++ b/sys/arch/vax/include/param.h
@@ -1,5 +1,5 @@
-/* $OpenBSD: param.h,v 1.7 1997/01/16 14:26:25 maja Exp $ */
-/* $NetBSD: param.h,v 1.22 1997/01/11 11:06:17 ragge Exp $ */
+/* $OpenBSD: param.h,v 1.8 1997/09/10 11:47:09 maja Exp $ */
+/* $NetBSD: param.h,v 1.23 1997/02/24 23:23:06 fvdl Exp $ */
/*-
* Copyright (c) 1990 The Regents of the University of California.
* All rights reserved.
@@ -58,10 +58,17 @@
* Round p (pointer or byte index) up to a correctly-aligned value
* for all data types (int, long, ...). The result is u_int and
* must be cast to any desired pointer type.
+ *
+ * ALIGNED_POINTER is a boolean macro that checks whether an address
+ * is valid to fetch data elements of type t from on this architecture.
+ * This does not reflect the optimal alignment, just the possibility
+ * (within reasonable limits).
+ *
*/
-#define ALIGNBYTES (sizeof(int) - 1)
-#define ALIGN(p) (((u_int)(p) + ALIGNBYTES) &~ ALIGNBYTES)
+#define ALIGNBYTES (sizeof(int) - 1)
+#define ALIGN(p) (((u_int)(p) + ALIGNBYTES) &~ ALIGNBYTES)
+#define ALIGNED_POINTER(p,t) ((((u_long)(p)) & (sizeof(t)-1)) == 0)
#define PGSHIFT 9 /* LOG2(NBPG) */
#define NBPG (1<<PGSHIFT) /* (1 << PGSHIFT) bytes/page */