diff mbox

add odp_buffer_pool_destroy

Message ID 1414684484-57167-1-git-send-email-mike.holmes@linaro.org
State Rejected
Headers show

Commit Message

Mike Holmes Oct. 30, 2014, 3:54 p.m. UTC
Adding the compliment to odp_buffer_pool_create allows an
implementation to release resources

Signed-off-by: Mike Holmes <mike.holmes@linaro.org>
---
 platform/linux-generic/include/api/odp_buffer_pool.h | 11 +++++++++++
 platform/linux-generic/odp_buffer_pool.c             |  7 +++++++
 2 files changed, 18 insertions(+)
diff mbox

Patch

diff --git a/platform/linux-generic/include/api/odp_buffer_pool.h b/platform/linux-generic/include/api/odp_buffer_pool.h
index d04abf0..160eb90 100644
--- a/platform/linux-generic/include/api/odp_buffer_pool.h
+++ b/platform/linux-generic/include/api/odp_buffer_pool.h
@@ -55,6 +55,17 @@  odp_buffer_pool_t odp_buffer_pool_create(const char *name,
 					 size_t buf_size, size_t buf_align,
 					 int buf_type);
 
+/**
+ * Delete a buffer pool
+ *
+ * @param pool  Buffer pool handle
+ *
+ * @retval 0 for success
+ * @retval 1 on failure
+ */
+int odp_buffer_pool_destroy(odp_buffer_pool_t pool);
+
+
 
 /**
  * Find a buffer pool by name
diff --git a/platform/linux-generic/odp_buffer_pool.c b/platform/linux-generic/odp_buffer_pool.c
index a48d7d6..d205f25 100644
--- a/platform/linux-generic/odp_buffer_pool.c
+++ b/platform/linux-generic/odp_buffer_pool.c
@@ -16,6 +16,7 @@ 
 #include <odp_config.h>
 #include <odp_hints.h>
 #include <odp_debug.h>
+#include <odp_debug_internal.h>
 
 #include <string.h>
 #include <stdlib.h>
@@ -410,6 +411,12 @@  odp_buffer_pool_t odp_buffer_pool_create(const char *name,
 	return pool_hdl;
 }
 
+/** @todo bug 619 */
+int odp_buffer_pool_destroy(odp_buffer_pool_t pool ODP_UNUSED)
+{
+	ODP_UNIMPLEMENTED();
+	return 0;
+}
 
 odp_buffer_pool_t odp_buffer_pool_lookup(const char *name)
 {