diff mbox

[RFC,06/17] Split out platform-specific part of odp_buffer_pool.h

Message ID 1398685276-4610-7-git-send-email-taras.kondratiuk@linaro.org
State RFC
Headers show

Commit Message

Taras Kondratiuk April 28, 2014, 11:41 a.m. UTC
---
 include/odp_buffer_pool.h                          |   20 +++------------
 .../linux-generic/include/plat/odp_buffer_pool.h   |   26 ++++++++++++++++++++
 2 files changed, 30 insertions(+), 16 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 8ac744a..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,18 +87,8 @@  odp_buffer_t odp_buffer_alloc(odp_buffer_pool_t pool);
  */
 void odp_buffer_free(odp_buffer_t buf);
 
-
-
-
 #ifdef __cplusplus
 }
 #endif
 
 #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