diff mbox series

[API-NEXT,v1,1/12] api: event: add free multiple

Message ID 1512140407-13534-2-git-send-email-odpbot@yandex.ru
State New
Headers show
Series [API-NEXT,v1,1/12] api: event: add free multiple | expand

Commit Message

Github ODP bot Dec. 1, 2017, 2:59 p.m. UTC
From: Petri Savolainen <petri.savolainen@linaro.org>


It's more efficient to free multiple events with a single
call than with separate calls.

Signed-off-by: Petri Savolainen <petri.savolainen@linaro.org>

---
/** Email created from pull request 318 (psavol:next-multi-apis)
 ** https://github.com/Linaro/odp/pull/318
 ** Patch: https://github.com/Linaro/odp/pull/318.patch
 ** Base sha: bdb7cbf620ada8682c89b5ae5a97cb84f16c0ed0
 ** Merge commit sha: aee2bcc574d2a8efdfcecc3b8e681ce391119798
 **/
 include/odp/api/spec/event.h | 22 ++++++++++++++++++++++
 1 file changed, 22 insertions(+)
diff mbox series

Patch

diff --git a/include/odp/api/spec/event.h b/include/odp/api/spec/event.h
index f924973f0..7e895c315 100644
--- a/include/odp/api/spec/event.h
+++ b/include/odp/api/spec/event.h
@@ -149,6 +149,28 @@  uint64_t odp_event_to_u64(odp_event_t hdl);
  */
 void odp_event_free(odp_event_t event);
 
+/**
+ * Free multiple events
+ *
+ * Otherwise like odp_event_free(), but frees multiple events to their
+ * originating pools.
+ *
+ * @param event    Array of event handles
+ * @param num      Number of events to free
+ */
+void odp_event_free_multi(const odp_event_t event[], int num);
+
+/**
+ * Free multiple events to the same pool
+ *
+ * Otherwise like odp_event_free_multi(), but all events must be from the
+ * same originating pool.
+ *
+ * @param event    Array of event handles
+ * @param num      Number of events to free
+ */
+void odp_event_free_sp(const odp_event_t event[], int num);
+
 /**
  * @}
  */