diff mbox

[RFC,1/2] Split odp_buffer.h into API and platform parts

Message ID 1397775822-26517-2-git-send-email-taras.kondratiuk@linaro.org
State Superseded
Headers show

Commit Message

Taras Kondratiuk April 17, 2014, 11:03 p.m. UTC
Keep platform specific values in separate header file.

Signed-off-by: Taras Kondratiuk <taras.kondratiuk@linaro.org>
---
 include/odp_buffer.h                             |   15 +--------------
 platform/linux-generic/Makefile                  |    2 ++
 platform/linux-generic/include/plat/odp_buffer.h |   12 ++++++++++++
 3 files changed, 15 insertions(+), 14 deletions(-)
 create mode 100644 platform/linux-generic/include/plat/odp_buffer.h
diff mbox

Patch

diff --git a/include/odp_buffer.h b/include/odp_buffer.h
index 2d2c25a..7e1108c 100644
--- a/include/odp_buffer.h
+++ b/include/odp_buffer.h
@@ -18,21 +18,8 @@ 
 extern "C" {
 #endif
 
-
-
 #include <odp_std_types.h>
-
-
-
-
-
-/**
- * ODP buffer
- */
-typedef uint32_t odp_buffer_t;
-
-#define ODP_BUFFER_INVALID (0xffffffff) /**< Invalid buffer */
-
+#include <plat/odp_buffer.h>
 
 /**
  * Buffer start address
diff --git a/platform/linux-generic/Makefile b/platform/linux-generic/Makefile
index 15e2a2c..2789fe8 100644
--- a/platform/linux-generic/Makefile
+++ b/platform/linux-generic/Makefile
@@ -137,5 +137,7 @@  headers_install: libs
 	$(ECHO) Installing headers to $(DESTDIR)/include
 	$(COPY) $(ODP_ROOT)/include $(DESTDIR)
 	$(COPY) include/api/* $(DESTDIR)/include/
+	$(MKDIR) $(DESTDIR)/include/plat
+	$(COPY) include/plat/* $(DESTDIR)/include/plat
 
 install: lib_install headers_install
diff --git a/platform/linux-generic/include/plat/odp_buffer.h b/platform/linux-generic/include/plat/odp_buffer.h
new file mode 100644
index 0000000..01a96c5
--- /dev/null
+++ b/platform/linux-generic/include/plat/odp_buffer.h
@@ -0,0 +1,12 @@ 
+/*
+ * No protector.
+ * This file should be included only in one corresponding top level header.
+ */
+
+/**
+ * ODP buffer
+ */
+typedef uint32_t odp_buffer_t;
+
+#define ODP_BUFFER_INVALID (0xffffffff) /**< Invalid buffer */
+