From patchwork Mon Aug 24 04:06:31 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bill Fischofer X-Patchwork-Id: 52615 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-wi0-f199.google.com (mail-wi0-f199.google.com [209.85.212.199]) by patches.linaro.org (Postfix) with ESMTPS id EB57C20AF6 for ; Mon, 24 Aug 2015 04:08:36 +0000 (UTC) Received: by wicja10 with SMTP id ja10sf22346396wic.2 for ; Sun, 23 Aug 2015 21:08:36 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:delivered-to:delivered-to:from:to:date :message-id:in-reply-to:references:subject:precedence:list-id :list-unsubscribe:list-archive:list-post:list-help:list-subscribe :mime-version:content-type:content-transfer-encoding:errors-to :sender:x-original-sender:x-original-authentication-results :mailing-list; bh=w7Fn5KalRTib14Vdx3u6e2GDmSNAipC+S6G4fjeF7eM=; b=gFPR1AvshniwlEWCBPM1m0ZQVpjFRhK2hpO/c0ZCLjChpuy9g6dZsXWWQZCEtWOKvN 0j75aSKloxufpovvTWQnR3aCoZewKzh7Qu2kRL/WCG+WZunL9Iuz5xnxzDaa3IF68kDZ 7U56O4BP1pXBNy9l3S/uuDxV1QPFFDSH2sQBIv9n0h34ro5/f7fCjMFEE6xc5hlMCNUi uplv17cqAnhEsslHfEjsFmsFOQW8bT3sf8zP9+Cj1f/m/QbZHF8hn3Xl0ia7vyVNbHdF rT41fxSBFG7ieLSMuHDNmKgbiriLPoOEPhsBb5qaVlE95sSXs4EjtDFmY189TDDKBOP2 Lcww== X-Gm-Message-State: ALoCoQkUTdgh99xMglcZIrXum2Np05bSkYrK4AeP9Ee0IFlpjR67Exz/43w8cMh87gW8XebCjU1R X-Received: by 10.112.132.105 with SMTP id ot9mr6151551lbb.21.1440389316231; Sun, 23 Aug 2015 21:08:36 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.37.137 with SMTP id y9ls391620laj.60.gmail; Sun, 23 Aug 2015 21:08:36 -0700 (PDT) X-Received: by 10.152.7.68 with SMTP id h4mr18319569laa.94.1440389316087; Sun, 23 Aug 2015 21:08:36 -0700 (PDT) Received: from mail-lb0-f181.google.com (mail-lb0-f181.google.com. [209.85.217.181]) by mx.google.com with ESMTPS id z6si12136537laj.8.2015.08.23.21.08.36 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 23 Aug 2015 21:08:36 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.181 as permitted sender) client-ip=209.85.217.181; Received: by lbcbn3 with SMTP id bn3so71938758lbc.2 for ; Sun, 23 Aug 2015 21:08:35 -0700 (PDT) X-Received: by 10.152.5.228 with SMTP id v4mr18442861lav.36.1440389315903; Sun, 23 Aug 2015 21:08:35 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.112.162.200 with SMTP id yc8csp2206876lbb; Sun, 23 Aug 2015 21:08:34 -0700 (PDT) X-Received: by 10.107.132.73 with SMTP id g70mr17172342iod.14.1440389314113; Sun, 23 Aug 2015 21:08:34 -0700 (PDT) Received: from lists.linaro.org (lists.linaro.org. [54.225.227.206]) by mx.google.com with ESMTP id m5si6660701igx.73.2015.08.23.21.08.33; Sun, 23 Aug 2015 21:08:34 -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; Received: by lists.linaro.org (Postfix, from userid 109) id 16D3361C9C; Mon, 24 Aug 2015 04:08:33 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on ip-10-142-244-252.ec2.internal X-Spam-Level: X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, URIBL_BLOCKED autolearn=disabled version=3.4.0 Received: from ip-10-142-244-252.ec2.internal (localhost [127.0.0.1]) by lists.linaro.org (Postfix) with ESMTP id DDDAC61CDB; Mon, 24 Aug 2015 04:06:56 +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 4541461B59; Mon, 24 Aug 2015 04:06:47 +0000 (UTC) Received: from mail-oi0-f50.google.com (mail-oi0-f50.google.com [209.85.218.50]) by lists.linaro.org (Postfix) with ESMTPS id AB72A61B59 for ; Mon, 24 Aug 2015 04:06:44 +0000 (UTC) Received: by oieu205 with SMTP id u205so2576384oie.0 for ; Sun, 23 Aug 2015 21:06:44 -0700 (PDT) X-Received: by 10.202.91.7 with SMTP id p7mr17060060oib.41.1440389204157; Sun, 23 Aug 2015 21:06:44 -0700 (PDT) Received: from Ubuntu15.localdomain (cpe-24-28-70-239.austin.res.rr.com. [24.28.70.239]) by smtp.gmail.com with ESMTPSA id ru8sm9436956oeb.8.2015.08.23.21.06.43 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sun, 23 Aug 2015 21:06:43 -0700 (PDT) From: Bill Fischofer To: lng-odp@lists.linaro.org Date: Sun, 23 Aug 2015 23:06:31 -0500 Message-Id: <1440389196-28814-4-git-send-email-bill.fischofer@linaro.org> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1440389196-28814-1-git-send-email-bill.fischofer@linaro.org> References: <1440389196-28814-1-git-send-email-bill.fischofer@linaro.org> X-Topics: patch Subject: [lng-odp] [API-NEXT PATCH 3/8] api: scheduler: Add ordered locks X-BeenThere: lng-odp@lists.linaro.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: , List-Help: , List-Subscribe: , MIME-Version: 1.0 Errors-To: lng-odp-bounces@lists.linaro.org Sender: "lng-odp" X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: bill.fischofer@linaro.org X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.181 as permitted sender) smtp.mailfrom=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 Add the following APIs: odp_schedule_order_lock() odp_schedule_order_unlock() Signed-off-by: Bill Fischofer --- include/odp/api/schedule.h | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/include/odp/api/schedule.h b/include/odp/api/schedule.h index 5837f69..8011583 100644 --- a/include/odp/api/schedule.h +++ b/include/odp/api/schedule.h @@ -164,6 +164,32 @@ void odp_schedule_release_atomic(void); void odp_schedule_release_ordered(void); /** + * Ordered context lock + * + * Provide reusable in-order serialization for scheduled ordered + * contexts. Upon return the caller is in order with respect to other events + * originating from the current ordered context and will retain order until a + * subsequent odp_schedule_order_unlock() call is made, or until order is + * resolved for the event via a call to odp_queue_enq() or + * odp_schedule_release_ordered(). This call is a no-op if the caller is not + * operating in an ordered context. + */ +void odp_schedule_order_lock(void); + +/** + * Ordered context unlock + * + * Release an ordered context lock previously acquired by + * odp_schedule_order_lock(). Following this call, the thread will exit the + * critical section protected by the ordered lock and will resume parallel + * execution until the next call to odp_schedule_order_lock(), or until order + * is resolved by a call to odp_queue_enq() or + * odp_schedule_release_ordered(). Note that this API is a no-op does if not + * called in an ordered context. + */ +void odp_schedule_order_unlock(void); + +/** * Prefetch events for next schedule call * * Hint the scheduler that application is about to finish processing the current