diff mbox series

[API-NEXT,v1,2/12] linux-gen: event: free multiple functions

Message ID 1512140407-13534-3-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>


Simple implementation of the new functions.

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
 **/
 platform/linux-generic/odp_event.c | 13 +++++++++++++
 1 file changed, 13 insertions(+)
diff mbox series

Patch

diff --git a/platform/linux-generic/odp_event.c b/platform/linux-generic/odp_event.c
index 66bc11fe4..2b0a7cddc 100644
--- a/platform/linux-generic/odp_event.c
+++ b/platform/linux-generic/odp_event.c
@@ -60,6 +60,19 @@  void odp_event_free(odp_event_t event)
 	}
 }
 
+void odp_event_free_multi(const odp_event_t event[], int num)
+{
+	int i;
+
+	for (i = 0; i < num; i++)
+		odp_event_free(event[i]);
+}
+
+void odp_event_free_sp(const odp_event_t event[], int num)
+{
+	odp_event_free_multi(event, num);
+}
+
 uint64_t odp_event_to_u64(odp_event_t hdl)
 {
 	return _odp_pri(hdl);