From 7db70a7e350617fac989c565d22fc834353b0668 Mon Sep 17 00:00:00 2001 From: Petri Savolainen Date: Thu, 30 Nov 2017 16:20:36 +0200 Subject: api: event: add free multiple It's more efficient to free multiple events with a single call than with separate calls. Signed-off-by: Petri Savolainen Reviewed-by: Bill Fischofer Reviewed-by: Balasubramanian Manoharan Signed-off-by: Maxim Uvarov --- include/odp/api/spec/event.h | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) (limited to 'include/odp/api/spec/event.h') 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); + /** * @} */ -- cgit v1.2.3