diff mbox

[v2,07/18] Split out platform-specific part of odp_buffer_pool.h

Message ID 1403027720-9738-8-git-send-email-taras.kondratiuk@linaro.org
State RFC
Headers show

Commit Message

Taras Kondratiuk June 17, 2014, 5:55 p.m. UTC
Signed-off-by: Taras Kondratiuk <taras.kondratiuk@linaro.org>
---
 include/odp_buffer_pool.h                          |   13 +++-------
 .../linux-generic/include/plat/odp_buffer_pool.h   |   26 ++++++++++++++++++++
 2 files changed, 30 insertions(+), 9 deletions(-)
 create mode 100644 platform/linux-generic/include/plat/odp_buffer_pool.h
diff mbox

Patch

diff --git a/include/odp_buffer_pool.h b/include/odp_buffer_pool.h
index 9112489..767aa08 100644
--- a/include/odp_buffer_pool.h
+++ b/include/odp_buffer_pool.h
@@ -18,20 +18,18 @@ 
 extern "C" {
 #endif
 
-
-
 #include <odp_std_types.h>
 #include <odp_buffer.h>
+#include <plat/odp_buffer_pool.h>
 
 /** Maximum queue name lenght in chars */
-#define ODP_BUFFER_POOL_NAME_LEN  32
+#define ODP_BUFFER_POOL_NAME_LEN PLAT_ODP_BUFFER_POOL_NAME_LEN
 
 /** Invalid buffer pool */
-#define ODP_BUFFER_POOL_INVALID  (0xffffffff)
+#define ODP_BUFFER_POOL_INVALID PLAT_ODP_BUFFER_POOL_INVALID
 
 /** ODP buffer pool */
-typedef uint32_t odp_buffer_pool_t;
-
+typedef plat_odp_buffer_pool_t odp_buffer_pool_t;
 
 /**
  * Create a buffer pool
@@ -89,9 +87,6 @@  odp_buffer_t odp_buffer_alloc(odp_buffer_pool_t pool);
  */
 void odp_buffer_free(odp_buffer_t buf);
 
-
-
-
 #ifdef __cplusplus
 }
 #endif
diff --git a/platform/linux-generic/include/plat/odp_buffer_pool.h b/platform/linux-generic/include/plat/odp_buffer_pool.h
new file mode 100644
index 0000000..7f68142
--- /dev/null
+++ b/platform/linux-generic/include/plat/odp_buffer_pool.h
@@ -0,0 +1,26 @@ 
+/* Copyright (c) 2013, Linaro Limited
+ * All rights reserved.
+ *
+ * SPDX-License-Identifier:     BSD-3-Clause
+ */
+
+
+/**
+ * @file
+ *
+ * ODP buffer pool
+ */
+
+#ifndef ODP_BUFFER_POOL_H_
+#error This file should be included only into corresponding top level header
+#else
+
+/** Maximum queue name lenght in chars */
+#define PLAT_ODP_BUFFER_POOL_NAME_LEN  32
+
+/** Invalid buffer pool */
+#define PLAT_ODP_BUFFER_POOL_INVALID  (0xffffffff)
+
+/** ODP buffer pool */
+typedef uint32_t plat_odp_buffer_pool_t;
+#endif