@@ -79,50 +79,6 @@ extern "C" {
/** Page size */
#define ODP_PAGE_SIZE 4096
-
-/*
- * Round up
- */
-
-
-/**
- * @internal
- * Round up pointer 'x' to alignment 'align'
- */
-#define ODP_ALIGN_ROUNDUP_PTR(x, align)\
- ((void *)ODP_ALIGN_ROUNDUP((uintptr_t)(x), (uintptr_t)(align)))
-
-
-/**
- * @internal
- * Round up pointer 'x' to cache line size alignment
- */
-#define ODP_CACHE_LINE_SIZE_ROUNDUP_PTR(x)\
- ((void *)ODP_CACHE_LINE_SIZE_ROUNDUP((uintptr_t)(x)))
-
-
-
-/*
- * Round down
- */
-
-
-/**
- * @internal
- * Round down pointer 'x' to 'align' alignment, which is a power of two
- */
-#define ODP_ALIGN_ROUNDDOWN_PTR_POWER_2(x, align)\
-((void *)ODP_ALIGN_ROUNDDOWN_POWER_2((uintptr_t)(x), (uintptr_t)(align)))
-
-
-/**
- * @internal
- * Round down pointer 'x' to cache line size alignment
- */
-#define ODP_CACHE_LINE_SIZE_ROUNDDOWN_PTR(x)\
- ((void *)ODP_CACHE_LINE_SIZE_ROUNDDOWN((uintptr_t)(x)))
-
-
/** Defines type/struct/variable to be cache line size aligned */
#define ODP_ALIGNED_CACHE ODP_ALIGNED(ODP_CACHE_LINE_SIZE)
@@ -43,6 +43,13 @@ extern "C" {
/**
* @internal
+ * Round up pointer 'x' to cache line size alignment
+ */
+#define ODP_CACHE_LINE_SIZE_ROUNDUP_PTR(x)\
+ ((void *)ODP_CACHE_LINE_SIZE_ROUNDUP((uintptr_t)(x)))
+
+/**
+ * @internal
* Round up 'x' to cache line size alignment
*/
#define ODP_CACHE_LINE_SIZE_ROUNDUP(x)\
@@ -72,6 +79,20 @@ extern "C" {
#define ODP_CACHE_LINE_SIZE_ROUNDDOWN(x)\
ODP_ALIGN_ROUNDDOWN_POWER_2(x, ODP_CACHE_LINE_SIZE)
+/**
+ * @internal
+ * Round down pointer 'x' to 'align' alignment, which is a power of two
+ */
+#define ODP_ALIGN_ROUNDDOWN_PTR_POWER_2(x, align)\
+ ((void *)ODP_ALIGN_ROUNDDOWN_POWER_2((uintptr_t)(x),\
+ (uintptr_t)(align)))
+/**
+ * @internal
+ * Round down pointer 'x' to cache line size alignment
+ */
+#define ODP_CACHE_LINE_SIZE_ROUNDDOWN_PTR(x)\
+ ((void *)ODP_CACHE_LINE_SIZE_ROUNDDOWN((uintptr_t)(x)))
+
/*
* Check align
*/
Move remaining API macros that were tagged @internal to the internal header file. Signed-off-by: Mike Holmes <mike.holmes@linaro.org> --- platform/linux-generic/include/api/odp_align.h | 44 ---------------------- .../linux-generic/include/odp_align_internal.h | 21 +++++++++++ 2 files changed, 21 insertions(+), 44 deletions(-)