summaryrefslogtreecommitdiffstats
path: root/rtemsbsd/include/rtems/bsd/sys/param.h
diff options
context:
space:
mode:
Diffstat (limited to 'rtemsbsd/include/rtems/bsd/sys/param.h')
-rw-r--r--rtemsbsd/include/rtems/bsd/sys/param.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/rtemsbsd/include/rtems/bsd/sys/param.h b/rtemsbsd/include/rtems/bsd/sys/param.h
index fb9b80cc..8042746c 100644
--- a/rtemsbsd/include/rtems/bsd/sys/param.h
+++ b/rtemsbsd/include/rtems/bsd/sys/param.h
@@ -177,6 +177,14 @@
#endif
/*
+ * 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) ((((u_long)(p)) & (sizeof(t) - 1)) == 0)
+
+/*
* Some macros for units conversion
*/