summaryrefslogtreecommitdiff
path: root/sys/arch/mac68k/include/param.h
diff options
context:
space:
mode:
authorbriggs <briggs@cvs.openbsd.org>1997-03-08 16:17:07 +0000
committerbriggs <briggs@cvs.openbsd.org>1997-03-08 16:17:07 +0000
commitff0673c19523d5b6bd01a362faa04af8f4ca9c13 (patch)
tree445632a2a4924f1e56bf8949a24dd9db30df5336 /sys/arch/mac68k/include/param.h
parent4c4f43623ba216b0bf625d16ef1c4eb0f8eb529c (diff)
Sync with NetBSD of about 4 March.
Diffstat (limited to 'sys/arch/mac68k/include/param.h')
-rw-r--r--sys/arch/mac68k/include/param.h17
1 files changed, 13 insertions, 4 deletions
diff --git a/sys/arch/mac68k/include/param.h b/sys/arch/mac68k/include/param.h
index a9fed796565..06b9d6b78c0 100644
--- a/sys/arch/mac68k/include/param.h
+++ b/sys/arch/mac68k/include/param.h
@@ -1,5 +1,5 @@
-/* $OpenBSD: param.h,v 1.5 1996/05/26 18:35:56 briggs Exp $ */
-/* $NetBSD: param.h,v 1.26 1996/05/05 06:17:49 briggs Exp $ */
+/* $OpenBSD: param.h,v 1.6 1997/03/08 16:17:00 briggs Exp $ */
+/* $NetBSD: param.h,v 1.28 1997/03/01 06:57:45 scottr Exp $ */
/*
* Copyright (c) 1988 University of Utah.
@@ -97,9 +97,16 @@
* 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 12 /* LOG2(NBPG) */
#define NBPG (1 << PGSHIFT) /* bytes/page */
@@ -135,7 +142,9 @@
* of the hardware page size.
*/
#define MSIZE 128 /* size of an mbuf */
+#ifndef MCLSHIFT
#define MCLSHIFT 11 /* convert bytes to m_buf clusters */
+#endif /* MCLSHIFT */
#define MCLBYTES (1 << MCLSHIFT) /* size of an m_buf cluster */
#define MCLOFSET (MCLBYTES - 1) /* offset within an m_buf cluster */