Signed-off-by: Nicolas Morey-Chaisemartin <nmo...@kalray.eu>
---
 include/odp/api/buffer.h | 26 ++++++++++++++++++++++++++
 1 file changed, 26 insertions(+)

diff --git a/include/odp/api/buffer.h b/include/odp/api/buffer.h
index aea273f..6631f47 100644
--- a/include/odp/api/buffer.h
+++ b/include/odp/api/buffer.h
@@ -105,6 +105,20 @@ odp_pool_t odp_buffer_pool(odp_buffer_t buf);
 odp_buffer_t odp_buffer_alloc(odp_pool_t pool);
 
 /**
+ * Allocate multiple buffers
+
+ * Otherwise like odp_buffer_alloc(), but allocates multiple buffers from a 
pool
+ *
+ * @param pool      Pool handle
+ * @param[out] buf  Array of buffer handles for output
+ * @param num       Maximum number of buffers to allocate
+ *
+ * @return Number of buffers actually allocated (0 ... num)
+ * @retval <0 on failure
+ */
+int odp_buffer_alloc_multi(odp_pool_t pool, odp_buffer_t buf[], int num);
+
+/**
  * Buffer free
  *
  * @param buf       Buffer handle
@@ -113,6 +127,18 @@ odp_buffer_t odp_buffer_alloc(odp_pool_t pool);
 void odp_buffer_free(odp_buffer_t buf);
 
 /**
+ * Free multiple buffers
+ *
+ * Otherwise like odp_buffer_free(), but frees multiple buffers
+ * to their originating pools.
+ *
+ * @param buf        Array of buffer handles
+ * @param num        Number of buffer handles to free
+ *
+ */
+void odp_buffer_free_multi(const odp_buffer_t buf[], int num);
+
+/**
  * Print buffer metadata to STDOUT
  *
  * @param buf      Buffer handle
-- 
2.6.0.3.g4057e08


_______________________________________________
lng-odp mailing list
lng-odp@lists.linaro.org
https://lists.linaro.org/mailman/listinfo/lng-odp

Reply via email to