From 978e1f6480c0cb66eddcd234dbc7d729fd97308e Mon Sep 17 00:00:00 2001 From: Matias Elo Date: Wed, 27 Sep 2023 10:00:04 +0300 Subject: [PATCH] api: queue: add odp_queue_destroy_multi() function Add new odp_queue_destroy_multi() function for destroying multiple queues with a single call. Signed-off-by: Matias Elo Reviewed-by: Petri Savolainen Reviewed-by: Jerin Jacob --- include/odp/api/spec/queue.h | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/include/odp/api/spec/queue.h b/include/odp/api/spec/queue.h index c278ce9c95..87f6e0d19c 100644 --- a/include/odp/api/spec/queue.h +++ b/include/odp/api/spec/queue.h @@ -87,6 +87,20 @@ int odp_queue_create_multi(const char *name[], const odp_queue_param_t param[], */ int odp_queue_destroy(odp_queue_t queue); +/** + * Destroy multiple queues + * + * Otherwise like odp_queue_destroy(), but destroys multiple queues with a + * single call. + * + * @param queue Array of queue handles + * @param num Number of queues to destroy + * + * @retval Number of queues actually destroyed (1 ... num) + * @retval <0 on failure + */ +int odp_queue_destroy_multi(odp_queue_t queue[], int num); + /** * Find a queue by name *