From patchwork Fri Dec 1 14:59:56 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Github ODP bot X-Patchwork-Id: 120339 Delivered-To: patch@linaro.org Received: by 10.140.22.227 with SMTP id 90csp1251079qgn; Fri, 1 Dec 2017 07:04:06 -0800 (PST) X-Google-Smtp-Source: AGs4zMavE0nWVDAxtkUs2A6501fqt97CeyGGai7hlB6lxEWiLcYa24xjPghnpPz2w3yrlk8rNAJK X-Received: by 10.200.25.227 with SMTP id s32mr8716037qtk.307.1512140645953; Fri, 01 Dec 2017 07:04:05 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1512140645; cv=none; d=google.com; s=arc-20160816; b=FN1QRwrkbvQug88VvifF+6vfHpFPB/H1T4woWtpJ/nE2s1F9sUad2x3junHDyqaDEp VBTPp3t1q8UMHIwlgsoAZyFMVD0mSLE3aZxdQgaxG5wwF38/62xhjBf9XvOtcVmtLmSg pCJo9ubXaYsVCHzNRwqjan0RRvEa9o1MjvErX5b9oAAwn1wzvBskHtN5wjFN0/MiSbhT uuM9cUs1oeyV2dRne/4zBKMljHdycnaW7EiU22Zq3mx8qHqJIaNbPVSqBkpdotSTu5/Y c6/02+9s7jG8VfcyuboR+7bcs/Gq0Od39ugpVKhczbw9ofdAfJaNcjVyAd0EwKbjnJlX eboQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:subject:github-pr-num :references:in-reply-to:message-id:date:to:from:delivered-to :arc-authentication-results; bh=1+nw+dkaHJohcruj9DAd6IpDnT4WcrQF51StpjjSKIY=; b=WOwEKenHjjlo5JH1av1s4BXTLS2XVi+XczK3lYUCNzZ312vyJjT7hKDy8vyHYWomp3 /qwRg2D9FQ4FjnKOjak1NQWcsholswWC0FOtzj7H0lN28vNerDUSlidpZ28nSj6+dYq7 cUjt7Yas21FxBfZdO8yN99BBmC7uTJ+dDcalboFhHfYh0avYpKzNQpRsHcg5DQe0VwAi rfNacvdoDIzEVLjZxdlFC+9FsTMyBujJUr4jW9ThQ4/DMvYpfNtfps/LitkPe9grW/bu RS6TU85FjPNnAwWVQMSZ/yCuH6iInMtZyjzvQmpqR7w7DLuB3djYtFL080dBmXPzS18a iJZA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of lng-odp-bounces@lists.linaro.org designates 54.197.127.237 as permitted sender) smtp.mailfrom=lng-odp-bounces@lists.linaro.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=yandex.ru Return-Path: Received: from lists.linaro.org (ec2-54-197-127-237.compute-1.amazonaws.com. [54.197.127.237]) by mx.google.com with ESMTP id i44si5783306qtf.172.2017.12.01.07.04.05; Fri, 01 Dec 2017 07:04:05 -0800 (PST) Received-SPF: pass (google.com: domain of lng-odp-bounces@lists.linaro.org designates 54.197.127.237 as permitted sender) client-ip=54.197.127.237; Authentication-Results: mx.google.com; spf=pass (google.com: domain of lng-odp-bounces@lists.linaro.org designates 54.197.127.237 as permitted sender) smtp.mailfrom=lng-odp-bounces@lists.linaro.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=yandex.ru Received: by lists.linaro.org (Postfix, from userid 109) id 0A6116097D; Fri, 1 Dec 2017 15:04:05 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on ip-10-142-244-252 X-Spam-Level: X-Spam-Status: No, score=-5.4 required=5.0 tests=BAYES_00,FREEMAIL_FROM, RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H2, URIBL_BLOCKED autolearn=disabled version=3.4.0 Received: from [127.0.0.1] (localhost [127.0.0.1]) by lists.linaro.org (Postfix) with ESMTP id 3285C6098B; Fri, 1 Dec 2017 15:00:49 +0000 (UTC) X-Original-To: lng-odp@lists.linaro.org Delivered-To: lng-odp@lists.linaro.org Received: by lists.linaro.org (Postfix, from userid 109) id 207136097B; Fri, 1 Dec 2017 15:00:22 +0000 (UTC) Received: from forward104p.mail.yandex.net (forward104p.mail.yandex.net [77.88.28.107]) by lists.linaro.org (Postfix) with ESMTPS id 33A936086F for ; Fri, 1 Dec 2017 15:00:16 +0000 (UTC) Received: from mxback19j.mail.yandex.net (mxback19j.mail.yandex.net [IPv6:2a02:6b8:0:1619::95]) by forward104p.mail.yandex.net (Yandex) with ESMTP id A8B85183560 for ; Fri, 1 Dec 2017 18:00:14 +0300 (MSK) Received: from smtp1j.mail.yandex.net (smtp1j.mail.yandex.net [2a02:6b8:0:801::ab]) by mxback19j.mail.yandex.net (nwsmtp/Yandex) with ESMTP id UAAnPnvDqL-0EgiiSJX; Fri, 01 Dec 2017 18:00:14 +0300 Received: by smtp1j.mail.yandex.net (nwsmtp/Yandex) with ESMTPSA id I6qrBsStkX-0Eeaa8DT; Fri, 01 Dec 2017 18:00:14 +0300 (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits)) (Client certificate not present) From: Github ODP bot To: lng-odp@lists.linaro.org Date: Fri, 1 Dec 2017 17:59:56 +0300 Message-Id: <1512140407-13534-2-git-send-email-odpbot@yandex.ru> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1512140407-13534-1-git-send-email-odpbot@yandex.ru> References: <1512140407-13534-1-git-send-email-odpbot@yandex.ru> Github-pr-num: 318 Subject: [lng-odp] [PATCH API-NEXT v1 1/12] api: event: add free multiple X-BeenThere: lng-odp@lists.linaro.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: "The OpenDataPlane \(ODP\) List" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: lng-odp-bounces@lists.linaro.org Sender: "lng-odp" From: Petri Savolainen It's more efficient to free multiple events with a single call than with separate calls. Signed-off-by: Petri Savolainen --- /** 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 --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); + /** * @} */