From patchwork Wed Aug 5 22:55:13 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bill Fischofer X-Patchwork-Id: 51983 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 18E71229FD for ; Wed, 5 Aug 2015 23:00:39 +0000 (UTC) Received: by wijp15 with SMTP id p15sf162061wij.3 for ; Wed, 05 Aug 2015 16:00:38 -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=WMcyjqtb73GJaRpl9183hVvcKWhUQ2c/8l9ouzXa7Pk=; b=A/FMHvlNpQOzBGxL8azaCRKeEHqdVU5h+ITp4y8TmSJW9+KpFBiQUiTqoResMYZgz0 DmzGhhB5RK7X+vLF6lU2wbPYh92QJv5ebHEo0/cJWA/ETEeUVN6tE56fGkTErVVTfXEQ 8KoNLzfbeD3LmMwwC42aahuFIePJG/bDYLWNn6f6qcX90NGWJc2uY6wYJIA5KVB53WrF G/bqYBcqwVshjbLtNcRJQe7Q7E2aL0b7DyYE1JJ5fbFek1bP5NvzMg7m6AGsOZj2PPAP SDhOBgehM0jljw4Na6Feb5YG27jF4G0vrEicqwVMGCfbIYLfb0wLOVr8BkaoBDNMgLPm 1GnA== X-Gm-Message-State: ALoCoQkLKiw2PSHYan5suNohjIcQm3O0gkgzSya8HQhTjHkm24QUoPThMv4J/57O79arNX1dz1f+ X-Received: by 10.112.13.200 with SMTP id j8mr3432274lbc.14.1438815638011; Wed, 05 Aug 2015 16:00:38 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.6.196 with SMTP id d4ls272224laa.91.gmail; Wed, 05 Aug 2015 16:00:37 -0700 (PDT) X-Received: by 10.152.7.37 with SMTP id g5mr11822381laa.101.1438815637447; Wed, 05 Aug 2015 16:00:37 -0700 (PDT) Received: from mail-lb0-f174.google.com (mail-lb0-f174.google.com. [209.85.217.174]) by mx.google.com with ESMTPS id cq12si3266082lad.97.2015.08.05.16.00.37 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 05 Aug 2015 16:00:37 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.174 as permitted sender) client-ip=209.85.217.174; Received: by lbbpo9 with SMTP id po9so33142784lbb.2 for ; Wed, 05 Aug 2015 16:00:37 -0700 (PDT) X-Received: by 10.112.209.106 with SMTP id ml10mr11707190lbc.112.1438815637296; Wed, 05 Aug 2015 16:00:37 -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.7.198 with SMTP id l6csp614466lba; Wed, 5 Aug 2015 16:00:35 -0700 (PDT) X-Received: by 10.140.195.198 with SMTP id q189mr22824098qha.57.1438815635481; Wed, 05 Aug 2015 16:00:35 -0700 (PDT) Received: from lists.linaro.org (lists.linaro.org. [54.225.227.206]) by mx.google.com with ESMTP id 20si8215693qhd.63.2015.08.05.16.00.34; Wed, 05 Aug 2015 16:00:35 -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 B8644620B1; Wed, 5 Aug 2015 23:00:34 +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_H2, 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 9345E62095; Wed, 5 Aug 2015 22:56:16 +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 D5EC1620A9; Wed, 5 Aug 2015 22:56:12 +0000 (UTC) Received: from mail-ob0-f171.google.com (mail-ob0-f171.google.com [209.85.214.171]) by lists.linaro.org (Postfix) with ESMTPS id 8EF6362099 for ; Wed, 5 Aug 2015 22:55:32 +0000 (UTC) Received: by obbfr1 with SMTP id fr1so6464653obb.1 for ; Wed, 05 Aug 2015 15:55:32 -0700 (PDT) X-Received: by 10.182.58.81 with SMTP id o17mr10188090obq.13.1438815332001; Wed, 05 Aug 2015 15:55:32 -0700 (PDT) Received: from localhost.localdomain (cpe-24-28-70-239.austin.res.rr.com. [24.28.70.239]) by smtp.gmail.com with ESMTPSA id u81sm2658477oie.11.2015.08.05.15.55.31 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 05 Aug 2015 15:55:31 -0700 (PDT) From: Bill Fischofer To: lng-odp@lists.linaro.org Date: Wed, 5 Aug 2015 17:55:13 -0500 Message-Id: <1438815321-12344-6-git-send-email-bill.fischofer@linaro.org> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1438815321-12344-1-git-send-email-bill.fischofer@linaro.org> References: <1438815321-12344-1-git-send-email-bill.fischofer@linaro.org> X-Topics: patch Subject: [lng-odp] [API-NEXT PATCHv8 05/13] api: schedule: revised definition of odp_schedule_release_ordered 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.174 as permitted sender) smtp.mail=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 Signed-off-by: Bill Fischofer --- include/odp/api/schedule.h | 38 ++++++++++++++++++++++++-------------- 1 file changed, 24 insertions(+), 14 deletions(-) diff --git a/include/odp/api/schedule.h b/include/odp/api/schedule.h index bd858b3..f27bf78 100644 --- a/include/odp/api/schedule.h +++ b/include/odp/api/schedule.h @@ -147,21 +147,31 @@ void odp_schedule_resume(void); void odp_schedule_release_atomic(void); /** - * Release the current ordered context - * - * This call is valid only for source queues with ordered synchronization. It - * hints the scheduler that the user has done all enqueues that need to maintain - * event order in the current ordered context. The scheduler is allowed to - * release the ordered context of this thread and avoid reordering any following - * enqueues. However, the context may be still held until the next - * odp_schedule() or odp_schedule_multi() call - this call allows but does not - * force the scheduler to release the context early. - * - * Early ordered context release may increase parallelism and thus system - * performance, since scheduler may start reordering events sooner than the next - * schedule call. + * Release a specified event in the current ordered context. + * + * This call tells the scheduler that the current ordered context no longer + * needs to be maintained for the specified event. This call is needed if, for + * example, the caller will free or otherwise dispose of an event that came + * from an ordered queue without enqueuing it to another queue. This call does + * not effect the ordering associated with any other event held by the caller. + * + * Releasing order may increase parallelism and thus system performance, since + * the scheduler may start resolving reordered events sooner than the next + * odp_queue_enq() call. + * + * @param ev The event to be released from the current ordered context. + * + * @retval 0 Success. Upon return ev behaves as if it originated + * from a parallel rather than an ordered queue. + * + * @retval <0 Failure. This can occur if the event did not originate + * from an ordered queue (caller error) or the implementation + * is unable to release order at this time. In this case, + * the caller must not dispose of ev without enqueing it + * first to avoid deadlocking other events originating from + * ev's ordered queue. */ -void odp_schedule_release_ordered(void); +int odp_schedule_release_ordered(odp_event_t ev); /** * Prefetch events for next schedule call