From patchwork Tue Sep 12 15:00:27 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: 112320 Delivered-To: patch@linaro.org Received: by 10.80.202.13 with SMTP id d13csp38748edi; Tue, 12 Sep 2017 08:02:00 -0700 (PDT) X-Google-Smtp-Source: AOwi7QBz6L5wKNknGJouxD3R8rDxi+0eGqacV4yzEP/8lkQN2xyBcO4FL0BoIzGnHuNG0p10IpUk X-Received: by 10.55.184.1 with SMTP id i1mr6654919qkf.236.1505228519936; Tue, 12 Sep 2017 08:01:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1505228519; cv=none; d=google.com; s=arc-20160816; b=v6m41LUu2KypFbYL/R229Ni4C+WD/C/Qm/5EkjlPqW4vjIYIk9TiHeQgYyY8LyIoMD EPjHC1ev7igvk3GoQlbFp0uPVZnaTBe93B387NDonoK7YDxP+IJDJmQA4uJuZBY7z1Ti Yr6dIyZgX06CggdOEhCS29z3dEBjY9QnnxsDyje7NJ1k3SPv5MLCnvPBw8xscRJizCvT BUm3NYkvglXD62ZQuFqBbnQuYb3yc3xOcx3nZ6iKJPf7vo28uZWW5h8e2+P+EwCqA6zJ ow8cgrKe0Y74Gt9PqGkPhnZIC+mTUZiSyZATas5oVUraf2UWelDlE8btG+rAElbfgroV a9UQ== 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=dwnqbhkWHGf5Es0tf6OJ3t9dFABgrK7qW05qQjNlvFU=; b=Ho5eHlfTguSlCGwqs6Vlv27yyRLEhPXrYWbxiSxsRGf9aLF7/pKNRpu+NVmXq2nB6M Q/yyKWCzU9kYLKsj5Osms5vELK7WTmlUHpQz7w0j9BG50xzoyTP2b9bAVIJobk9jzDjl OW9BiQmiKa3Oq0dVPJ2nSD3UT5Ts9t1ejJVSsyKdSz9ZwsY/4fIWT20JKlKu3SUBE1ZZ JzNe+bHCkJB9JWJ2Eyn0xuhKunf/ybICkGRWDXjT6tZTQfsUeDQTDBMzG+1SGBj8xXB7 KTM1io1Wohp6z6qFaBBCqovqPuP4qKoyiIe1lKuMEsVNVtUZnLE23MrDnK52y6QNbXou XyhQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of lng-odp-bounces@lists.linaro.org designates 54.225.227.206 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 (lists.linaro.org. [54.225.227.206]) by mx.google.com with ESMTP id h135si12125075qka.544.2017.09.12.08.01.59; Tue, 12 Sep 2017 08:01:59 -0700 (PDT) Received-SPF: pass (google.com: domain of lng-odp-bounces@lists.linaro.org designates 54.225.227.206 as permitted sender) client-ip=54.225.227.206; Authentication-Results: mx.google.com; spf=pass (google.com: domain of lng-odp-bounces@lists.linaro.org designates 54.225.227.206 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 7B31762AE6; Tue, 12 Sep 2017 15:01:59 +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=-1.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,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 831D860880; Tue, 12 Sep 2017 15:01:08 +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 C2B5F6072B; Tue, 12 Sep 2017 15:00:55 +0000 (UTC) Received: from forward102j.mail.yandex.net (forward102j.mail.yandex.net [5.45.198.243]) by lists.linaro.org (Postfix) with ESMTPS id C13076071A for ; Tue, 12 Sep 2017 15:00:49 +0000 (UTC) Received: from mxback4j.mail.yandex.net (mxback4j.mail.yandex.net [IPv6:2a02:6b8:0:1619::10d]) by forward102j.mail.yandex.net (Yandex) with ESMTP id 455D15604E23 for ; Tue, 12 Sep 2017 18:00:48 +0300 (MSK) Received: from smtp1p.mail.yandex.net (smtp1p.mail.yandex.net [2a02:6b8:0:1472:2741:0:8b6:6]) by mxback4j.mail.yandex.net (nwsmtp/Yandex) with ESMTP id 4739OB3sCr-0l4e61a3; Tue, 12 Sep 2017 18:00:48 +0300 Received: by smtp1p.mail.yandex.net (nwsmtp/Yandex) with ESMTPSA id PadAyxFNxx-0kH4AZMj; Tue, 12 Sep 2017 18:00:47 +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, 12 Sep 2017 18:00:27 +0300 Message-Id: <1505228428-32327-2-git-send-email-odpbot@yandex.ru> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1505228428-32327-1-git-send-email-odpbot@yandex.ru> References: <1505228428-32327-1-git-send-email-odpbot@yandex.ru> Github-pr-num: 160 Subject: [lng-odp] [PATCH API-NEXT v6 1/2] api: schedule: add schedule order unlock lock api 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 Adds odp_schedule_order_unlock_lock() api. This API combines schedule order unlock and lock into a single api for performance optimization in HW. Signed-off-by: Balasubramanian Manoharan --- /** Email created from pull request 160 (bala-manoharan:api_sched_order_lock) ** https://github.com/Linaro/odp/pull/160 ** Patch: https://github.com/Linaro/odp/pull/160.patch ** Base sha: 6b6253c30f88c80bf632436ff06c1b000860a2f1 ** Merge commit sha: 14974ba25c29ba2d92eed93e083a4ce292b7602b **/ 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 8244746d..1c7ef38a 100644 --- a/include/odp/api/spec/schedule.h +++ b/include/odp/api/spec/schedule.h @@ -347,6 +347,9 @@ int odp_schedule_group_info(odp_schedule_group_t group, * be protected by its own ordered lock. This promotes maximum parallelism by * allowing order to maintained on a more granular basis. If an ordered lock * is used multiple times in the same ordered context results are undefined. + * Only one ordered lock can be active in an ordered context at any given time. + * Resuls are undefined when multiple ordered locks are acquired in nested + * fashion within the same ordered context. * * @param lock_index Index of the ordered lock in the current context to be * acquired. Must be in the range 0..odp_queue_lock_count() @@ -368,6 +371,31 @@ void odp_schedule_order_lock(unsigned lock_index); void odp_schedule_order_unlock(unsigned lock_index); /** + * Release existing ordered context lock and acquire a new lock + * + * This call is valid only when holding an ordered synchronization context. + * Release a previously locked ordered context lock and acquire a new ordered + * context lock. This call is valid only when there is a single ordered context + * lock active. Results are undefined if this call is made when multiple ordered + * context locks are acquired in nested fashion. + * This call does not release the existing ordered context and only switches + * from one ordered lock to another ordered lock within the same ordered + * context. + * + * @param unlock_index Index of the acquired ordered lock in the current + * context to be released. Results are undefined if the + * ordered lock with the given unlock_index is not held by + * this ordered context. + * @param lock_index Index of the ordered lock in the current context to be + * acquired. Previously acquired ordered lock is released. + * Must be in the range 0...odp_queue_lock_count() - 1. + * + * @see odp_schedule_order_lock(), odp_schedule_order_unlock() + * + */ +void odp_schedule_order_unlock_lock(uint32_t unlock_index, uint32_t lock_index); + +/** * @} */