Signed-off-by: Mike Holmes <[email protected]>
---
platform/linux-generic/include/api/odp_buffer_pool.h | 18 ++++++++++++++++++
platform/linux-generic/odp_buffer_pool.c | 7 +++++++
2 files changed, 25 insertions(+)
diff --git a/platform/linux-generic/include/api/odp_buffer_pool.h
b/platform/linux-generic/include/api/odp_buffer_pool.h
index d04abf0..7225fb7 100644
--- a/platform/linux-generic/include/api/odp_buffer_pool.h
+++ b/platform/linux-generic/include/api/odp_buffer_pool.h
@@ -55,6 +55,24 @@ odp_buffer_pool_t odp_buffer_pool_create(const char *name,
size_t buf_size, size_t buf_align,
int buf_type);
+/**
+ * Destroy a buffer pool
+ *
+ * This routine destroys a previously created buffer pool.
+ * @note Attempts to destroy a predefined buffer pool will be rejected.
+ * @warning The result is undefined if an attempt is made to destroy a buffer
pool that
+ * contains allocated buffers.
+ *
+ * @sa odp_buffer_free
+ *
+ * @param pool[in] 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)
{
--
2.1.0
_______________________________________________
lng-odp mailing list
[email protected]
http://lists.linaro.org/mailman/listinfo/lng-odp