From patchwork Sun Aug 9 16:54:24 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bill Fischofer X-Patchwork-Id: 52113 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 10E4920539 for ; Sun, 9 Aug 2015 16:57:56 +0000 (UTC) Received: by wicja10 with SMTP id ja10sf6801343wic.2 for ; Sun, 09 Aug 2015 09:57:55 -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=kQ/9lbfvgHc404q9ojmFv189H2qdJ6km7HCRDYABcHw=; b=IndMzdk/HTIuSaWvZVnIy+PXM68VTnLyowTSB/9nv6wzfDcIcwyuB20YSQhVxhPxgm Iw2wueya/YOVNPA0hG8n15UXWLBbRfESseXre7v1URMVk7DMtmIW/T9ctfO+V0QPP2Ol X4KHhy4xnOqDV0pb6c3PQ2Q4NuvKsxXc0TQimc24Sig6WFThusL+yZrs9WaYBjsBJdTC o0eeFpZK1hBfi5pC2AomP32zyhVx34kYtn+O84XuXiMGbxEbApWIKdWKAjdhOGIQgjDI ZWiCk+Qr6mfCnIbHB2I4upq24PfG2CXXZrXq+j7Czsb97yFcbbALclNMP3qYcI0giDGy RAWg== X-Gm-Message-State: ALoCoQk2HRIA1AaaeILXbKlOkqlLCd5HknKz8PjuypN1jbRB+V4Uh0mavLtkJULTCumPV3FhSaHL X-Received: by 10.112.170.67 with SMTP id ak3mr3534770lbc.6.1439139474781; Sun, 09 Aug 2015 09:57:54 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.36.1 with SMTP id m1ls266430laj.32.gmail; Sun, 09 Aug 2015 09:57:54 -0700 (PDT) X-Received: by 10.152.1.66 with SMTP id 2mr17197589lak.56.1439139474504; Sun, 09 Aug 2015 09:57:54 -0700 (PDT) Received: from mail-la0-f49.google.com (mail-la0-f49.google.com. [209.85.215.49]) by mx.google.com with ESMTPS id g1si12321514laa.144.2015.08.09.09.57.54 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 09 Aug 2015 09:57:54 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.49 as permitted sender) client-ip=209.85.215.49; Received: by lalv9 with SMTP id v9so629775lal.0 for ; Sun, 09 Aug 2015 09:57:54 -0700 (PDT) X-Received: by 10.153.7.66 with SMTP id da2mr16712657lad.117.1439139474274; Sun, 09 Aug 2015 09:57:54 -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 l6csp1511345lba; Sun, 9 Aug 2015 09:57:53 -0700 (PDT) X-Received: by 10.107.152.144 with SMTP id a138mr17499831ioe.149.1439139472592; Sun, 09 Aug 2015 09:57:52 -0700 (PDT) Received: from lists.linaro.org (lists.linaro.org. [54.225.227.206]) by mx.google.com with ESMTP id e96si12891454ioi.25.2015.08.09.09.57.51; Sun, 09 Aug 2015 09:57:52 -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 A04EA61D5D; Sun, 9 Aug 2015 16:57:51 +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 35C8961E30; Sun, 9 Aug 2015 16:54:55 +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 B907061E01; Sun, 9 Aug 2015 16:54:45 +0000 (UTC) Received: from mail-ob0-f173.google.com (mail-ob0-f173.google.com [209.85.214.173]) by lists.linaro.org (Postfix) with ESMTPS id CB20661DD3 for ; Sun, 9 Aug 2015 16:54:43 +0000 (UTC) Received: by obbhe7 with SMTP id he7so13032605obb.0 for ; Sun, 09 Aug 2015 09:54:43 -0700 (PDT) X-Received: by 10.60.69.39 with SMTP id b7mr15793181oeu.51.1439139283275; Sun, 09 Aug 2015 09:54:43 -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 x69sm199357oif.5.2015.08.09.09.54.42 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sun, 09 Aug 2015 09:54:42 -0700 (PDT) From: Bill Fischofer To: lng-odp@lists.linaro.org Date: Sun, 9 Aug 2015 11:54:24 -0500 Message-Id: <1439139273-22438-5-git-send-email-bill.fischofer@linaro.org> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1439139273-22438-1-git-send-email-bill.fischofer@linaro.org> References: <1439139273-22438-1-git-send-email-bill.fischofer@linaro.org> X-Topics: patch Subject: [lng-odp] [API-NEXT PATCHv14 04/13] api: schedule: add APIs for order copying and sustaining 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.215.49 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 Additional scheduler APIs: odp_schedule_order_copy() odp_schedule_order_sustain() odp_schedule_order_sustain_set() Signed-off-by: Bill Fischofer --- include/odp/api/schedule.h | 51 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 51 insertions(+) diff --git a/include/odp/api/schedule.h b/include/odp/api/schedule.h index f27bf78..61d3b16 100644 --- a/include/odp/api/schedule.h +++ b/include/odp/api/schedule.h @@ -174,6 +174,57 @@ void odp_schedule_release_atomic(void); int odp_schedule_release_ordered(odp_event_t ev); /** + * Copy order from one event to another + * + * This call copies the order associated with an event originating from an + * ordered queue to another event. The target event must not have an + * associated ordering at input to the call. If the target is ordered, the + * prior ordering must first be released by an odp_schedule_release_ordered() + * call. Successfuly copying an order implicitly sets the order sustain + * attribute for the src_event as if odp_schedule_order_sustain() were called + * for it. + * + * @param src_event Event whose ordering is to be copied + * @param dst_event Event to receive the same ordering as src_event. + * + * @retval 0 Success + * @retval <0 Failure. Order not copied. + */ +int odp_schedule_order_copy(odp_event_t src_event, odp_event_t dst_event); + +/* + * Get order sustain attribute + * + * Retrieve the order sustain attribute associated with an event. An event + * normally consumes its order when enqueued. An event that sustains order + * does not consume its order when enqueued, permitting multiple events to + * be sequenced in the same relative order. + * + * @param ev Event + * + * @retval 0 Event will not sustain order when queued + * @retval 1 Event will sustain order when queued + * @retval <0 Event has no associated ordering + */ +int odp_schedule_order_sustain(odp_event_t ev); + +/* + * Set order sustain attribute + * + * Set the order sustain attribute associated with an event. An event + * normally consumes its order when enqueued. An event that sustains order + * does not consume its order when enqueued, permitting multiple events to + * be sequenced in the same relative order. + * + * @param ev Event + * @param sustain Value to be set (0 or 1) + * + * @retval 0 Success + * @retval <0 Failure. Event not ordered or invalid sustain value specified. + */ +int odp_schedule_order_sustain_set(odp_event_t ev, odp_bool_t sustain); + +/** * Prefetch events for next schedule call * * Hint the scheduler that application is about to finish processing the current