summaryrefslogtreecommitdiff
path: root/sys/arch/sh/include/param.h
diff options
context:
space:
mode:
Diffstat (limited to 'sys/arch/sh/include/param.h')
-rw-r--r--sys/arch/sh/include/param.h19
1 files changed, 4 insertions, 15 deletions
diff --git a/sys/arch/sh/include/param.h b/sys/arch/sh/include/param.h
index 320d8b0e909..03f39929a21 100644
--- a/sys/arch/sh/include/param.h
+++ b/sys/arch/sh/include/param.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: param.h,v 1.7 2011/04/07 15:45:18 miod Exp $ */
+/* $OpenBSD: param.h,v 1.8 2011/09/08 03:40:32 guenther Exp $ */
/* $NetBSD: param.h,v 1.15 2006/08/28 13:43:35 yamt Exp $ */
/*-
@@ -66,20 +66,9 @@
#define NBPG PAGE_SIZE
#define PGOFSET PAGE_MASK
-/*
- * Round p (pointer or byte index) up to a correctly-aligned value
- * for all data types (int, long, ...). The result is u_long 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_long)(p) + ALIGNBYTES) & ~ALIGNBYTES)
-#define ALIGNED_POINTER(p, t) ((((u_long)(p)) & (sizeof(t) - 1)) == 0)
+#define ALIGNBYTES _ALIGNBYTES
+#define ALIGN(p) _ALIGN(p)
+#define ALIGNED_POINTER(p,t) _ALIGNED_POINTER(p,t)
#define DEV_BSHIFT 9 /* log2(DEV_BSIZE) */
#define DEV_BSIZE (1 << DEV_BSHIFT)