]> git.saurik.com Git - apple/xnu.git/blobdiff - bsd/arm/_param.h
xnu-4570.1.46.tar.gz
[apple/xnu.git] / bsd / arm / _param.h
diff --git a/bsd/arm/_param.h b/bsd/arm/_param.h
new file mode 100644 (file)
index 0000000..2d1e03a
--- /dev/null
@@ -0,0 +1,22 @@
+/*
+ * Copyright (c) 2006-2007 Apple Inc. All rights reserved.
+ */
+
+#ifndef _ARM__PARAM_H_
+#define _ARM__PARAM_H_
+
+#include <arm/_types.h>
+
+/*
+ * Round p (pointer or byte index) up to a correctly-aligned value for all
+ * data types (int, long, ...).   The result is unsigned int and must be
+ * cast to any desired pointer type.
+ */
+#define        __DARWIN_ALIGNBYTES     (sizeof(__darwin_size_t) - 1)
+#define        __DARWIN_ALIGN(p)       ((__darwin_size_t)((char *)(__darwin_size_t)(p) + __DARWIN_ALIGNBYTES) &~ __DARWIN_ALIGNBYTES)
+
+#define      __DARWIN_ALIGNBYTES32     (sizeof(__uint32_t) - 1)
+#define       __DARWIN_ALIGN32(p)       ((__darwin_size_t)((char *)(__darwin_size_t)(p) + __DARWIN_ALIGNBYTES32) &~ __DARWIN_ALIGNBYTES32)
+
+
+#endif /* _ARM__PARAM_H_ */