From patchwork Tue Feb 6 10:00:07 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Github ODP bot X-Patchwork-Id: 126973 Delivered-To: patch@linaro.org Received: by 10.46.124.24 with SMTP id x24csp2763335ljc; Tue, 6 Feb 2018 02:02:52 -0800 (PST) X-Google-Smtp-Source: AH8x226IM0bdtlRNqWCfDAwteJBLMfykcgn5zMqOBUDPHpG+fRM+qVm3+4FU/ABcyS6i4+XXAnTE X-Received: by 10.237.54.71 with SMTP id e65mr2451370qtb.219.1517911372577; Tue, 06 Feb 2018 02:02:52 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1517911372; cv=none; d=google.com; s=arc-20160816; b=KQMq0pfpfBm8kIMBG3fOpB4tivvX14qg6XzIvuPS86fI5a4W+pKGi9Xig8zrwDkgoA kXhoL40QykUs6Y1WpE9KPJLdOqOxvRU915D1gHrONdbvjXmDnIWDngYZKwmZV/ZF3ZQI yq6kOfradNic4qapY5iKdlMIflnDPSQ5dQdYGlUR750R66obTegS0l85zegFsmAu+npO IOyri+xOVFrnl3zf48By4/3j3d0QTZx8zjbdALzdH7NGkwdJ+HInaKUge+DjAxBJMra0 pOrkuwEN+BmsZ2IKu7hIG7PKUoJMR5MELVs4tpq7IL3ATjnUFyHZCBYzXzD7l9JQkvUT FFJQ== 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=IB5LKPCyMOH7LfQ+6A3XHZ/1MpZpc2DJ7YJDP5t/kgE=; b=t4ocAfcuMSWg2lwWbVbIVDWzoc7Yh72BHBB+YNlv+jhN8qQ6Mw4eUDIpYHbxcC74jl rS4Bec8T4iRkvL9pTLSbHhI6/mgXukiWuZOPCx22PPK8jGs9mu0lHf5a7zpZQ2rdhJNd 5EanvZZh7alTVP4n6vhcs+B37fsgeYGVNYN6mWQROfiYnE37NSn7i0IAwaa6uvgAnTef eup6CwUsFoQmvD/2yoPCNmjy+f9VEcaypmZJc4y2UsihoZMvdCTtVwXJtoS8vRIlVNO6 U+FFHOEqwRVZquNxdXzXwsfZoaHjX4K4xsXjV3DFBceg80YMr2MWUfGVRNP3AyfhNqzw aJ4w== 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 q6si4865489qtj.115.2018.02.06.02.02.52; Tue, 06 Feb 2018 02:02:52 -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 3FE71619BF; Tue, 6 Feb 2018 10:02:52 +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=-2.6 required=5.0 tests=BAYES_00,FREEMAIL_FROM, RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H2 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 4C5EF6176B; Tue, 6 Feb 2018 10:00:36 +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 74D3861502; Tue, 6 Feb 2018 10:00:25 +0000 (UTC) Received: from forward104o.mail.yandex.net (forward104o.mail.yandex.net [37.140.190.179]) by lists.linaro.org (Postfix) with ESMTPS id A078C616F7 for ; Tue, 6 Feb 2018 10:00:13 +0000 (UTC) Received: from mxback15g.mail.yandex.net (mxback15g.mail.yandex.net [IPv6:2a02:6b8:0:1472:2741:0:8b7:94]) by forward104o.mail.yandex.net (Yandex) with ESMTP id 336C2704B62 for ; Tue, 6 Feb 2018 13:00:10 +0300 (MSK) Received: from smtp3o.mail.yandex.net (smtp3o.mail.yandex.net [2a02:6b8:0:1a2d::27]) by mxback15g.mail.yandex.net (nwsmtp/Yandex) with ESMTP id pqQKrWORGj-0AjCZYfN; Tue, 06 Feb 2018 13:00:10 +0300 Received: by smtp3o.mail.yandex.net (nwsmtp/Yandex) with ESMTPSA id oMX7ufMruB-0964DYrJ; Tue, 06 Feb 2018 13:00:09 +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: Tue, 6 Feb 2018 13:00:07 +0300 Message-Id: <1517911208-3820-2-git-send-email-odpbot@yandex.ru> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1517911208-3820-1-git-send-email-odpbot@yandex.ru> References: <1517911208-3820-1-git-send-email-odpbot@yandex.ru> Github-pr-num: 453 Subject: [lng-odp] [PATCH API-NEXT v3 1/2] api: schedule: add asynchronous order lock 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: Balasubramanian Manoharan add asynchronous order lock api. schedule order context lock can be acquired asynchronously using two functions start and wait. application can utilize the cycles between these functions to increase performance. Signed-off-by: Balasubramanian Manoharan --- /** Email created from pull request 453 (bala-manoharan:async_order_lock) ** https://github.com/Linaro/odp/pull/453 ** Patch: https://github.com/Linaro/odp/pull/453.patch ** Base sha: 1836820278b57de6144c75872e148976d49d28a2 ** Merge commit sha: 4a224aabaa82727f0e2038fd0361ae561e020e17 **/ include/odp/api/spec/schedule.h | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/include/odp/api/spec/schedule.h b/include/odp/api/spec/schedule.h index d493cc75f..bbc749836 100644 --- a/include/odp/api/spec/schedule.h +++ b/include/odp/api/spec/schedule.h @@ -371,6 +371,34 @@ void odp_schedule_order_unlock(uint32_t lock_index); */ void odp_schedule_order_unlock_lock(uint32_t unlock_index, uint32_t lock_index); +/** Asynchronous ordered context lock + * Request an ordered context lock to be acquired. Starts an ordered context + * lock acquire operation, but does not wait until the lock has been acquired. + * Application can use this call to potentially interleave some processing + * within waiting for this lock. Each start lock call must be paired with a wait + * call that blocks until the lock has been acquired. Locks cannot be acquired + * in nested fashion i.e each start call must follow a paring wait and unlock + * calls, before using another lock. + * The same constraints apply as with odp_schedule_order_lock() + * + * @param lock_index Index of the ordered lock in the current context to + * start acquire operation. + * Must be in the range 0..odp_queue_lock_count() - 1. + * + */ +void odp_schedule_order_lock_start(uint32_t lock_index); + +/** Asynchronous ordered context lock wait + * Wait for a previously started lock acquire operation to finish. + * Lock index must match with the previous start call. Ordered lock acquisition + * will be completed during this call. + * + * @param lock_index Index of the ordered lock in the current context to + * complete acquire operation. + * Must be in the range 0..odp_queue_lock_count() - 1. + */ +void odp_schedule_order_lock_wait(uint32_t lock_index); + /** * @} */