summaryrefslogtreecommitdiffstats
path: root/sys/arm/include/param.h
diff options
context:
space:
mode:
Diffstat (limited to 'sys/arm/include/param.h')
-rw-r--r--sys/arm/include/param.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/sys/arm/include/param.h b/sys/arm/include/param.h
index 802390b..c680148 100644
--- a/sys/arm/include/param.h
+++ b/sys/arm/include/param.h
@@ -80,6 +80,13 @@
#define ALIGNBYTES _ALIGNBYTES
#define ALIGN(p) _ALIGN(p)
+/*
+ * 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 ALIGNED_POINTER(p, t) ((((unsigned)(p)) & (sizeof(t)-1)) == 0)
/*
* CACHE_LINE_SIZE is the compile-time maximum cache line size for an
OpenPOWER on IntegriCloud