From patchwork Tue Aug 4 22:41: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: 51925 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 30BB422E8E for ; Tue, 4 Aug 2015 22:52:25 +0000 (UTC) Received: by wiwv4 with SMTP id v4sf5804154wiw.1 for ; Tue, 04 Aug 2015 15:52:24 -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=DXpYLIWtd+pNGIQY+Gd9hXV82Piqt58qCKzi4xTNZgM=; b=Iz8kS3nZ3SYS+z4HYHHokVSLpb93jm8jHhy3SedCpzIij8rpMRI2KNBXHXY5UeE7lM QY+bvZgtkz1A7NBqZ4onX8jXHq8/zTOdSludhvyKcbfKDRG+dl+qJ0D7cQEBJlskSsXF N+oYF+UE0BaYJTvf59n4QYxKm1nHmOWa3PWx5epQqGkbgtmv91fSY6LiRbY7+1Ff1tLA TrheivICFdnD2HV5qPdWfOvqO/ok0d8RL2oGzsZxCL7MmdNzo5yBUdgysIxhBwEpRwFD pG6EtXWQ5caTlBqtfUPRJ6VnFtKPhffsGeM7YHgKHjgEg0UYUxjqEBFJEfAAhiotX4Y3 406w== X-Gm-Message-State: ALoCoQk4osthOi3Qm1fSK8blfigbe3zjq/QbCR/sOj+qGDSWR9s2OKd/RREubeKJoNxxBV7OLarg X-Received: by 10.194.184.6 with SMTP id eq6mr1796112wjc.4.1438728744441; Tue, 04 Aug 2015 15:52:24 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.6.163 with SMTP id c3ls108506laa.98.gmail; Tue, 04 Aug 2015 15:52:24 -0700 (PDT) X-Received: by 10.152.87.205 with SMTP id ba13mr6520275lab.37.1438728744283; Tue, 04 Aug 2015 15:52:24 -0700 (PDT) Received: from mail-lb0-f177.google.com (mail-lb0-f177.google.com. [209.85.217.177]) by mx.google.com with ESMTPS id y5si841886lay.123.2015.08.04.15.52.23 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 04 Aug 2015 15:52:23 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.177 as permitted sender) client-ip=209.85.217.177; Received: by lbbud7 with SMTP id ud7so14593859lbb.3 for ; Tue, 04 Aug 2015 15:52:23 -0700 (PDT) X-Received: by 10.112.131.98 with SMTP id ol2mr6800223lbb.56.1438728743721; Tue, 04 Aug 2015 15:52:23 -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 l6csp36284lba; Tue, 4 Aug 2015 15:52:22 -0700 (PDT) X-Received: by 10.50.70.34 with SMTP id j2mr2609013igu.54.1438728742127; Tue, 04 Aug 2015 15:52:22 -0700 (PDT) Received: from lists.linaro.org (lists.linaro.org. [54.225.227.206]) by mx.google.com with ESMTP id i86si808552iod.88.2015.08.04.15.52.21; Tue, 04 Aug 2015 15:52:22 -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 E8ABC61D9E; Tue, 4 Aug 2015 22:52:20 +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 398C161FB1; Tue, 4 Aug 2015 22:45:42 +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 212A361E32; Tue, 4 Aug 2015 22:43:18 +0000 (UTC) Received: from mail-oi0-f53.google.com (mail-oi0-f53.google.com [209.85.218.53]) by lists.linaro.org (Postfix) with ESMTPS id 330C161FAC for ; Tue, 4 Aug 2015 22:41:41 +0000 (UTC) Received: by oio137 with SMTP id 137so9765231oio.0 for ; Tue, 04 Aug 2015 15:41:40 -0700 (PDT) X-Received: by 10.202.75.13 with SMTP id y13mr5243761oia.92.1438728100788; Tue, 04 Aug 2015 15:41:40 -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 sx2sm519170obc.0.2015.08.04.15.41.40 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 04 Aug 2015 15:41:40 -0700 (PDT) From: Bill Fischofer To: lng-odp@lists.linaro.org Date: Tue, 4 Aug 2015 17:41:24 -0500 Message-Id: <1438728085-3240-13-git-send-email-bill.fischofer@linaro.org> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1438728085-3240-1-git-send-email-bill.fischofer@linaro.org> References: <1438728085-3240-1-git-send-email-bill.fischofer@linaro.org> X-Topics: patch Subject: [lng-odp] [API-NEXT PATCHv7 12/13] api: schedule: add odp_schedule_order_sync() routine 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.177 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 | 55 +++++++++++++++------------------------------- 1 file changed, 18 insertions(+), 37 deletions(-) diff --git a/include/odp/api/schedule.h b/include/odp/api/schedule.h index af860c4..54c1397 100644 --- a/include/odp/api/schedule.h +++ b/include/odp/api/schedule.h @@ -174,6 +174,24 @@ void odp_schedule_release_atomic(void); int odp_schedule_release_ordered(odp_event_t ev); /** + * Ordered event synchronization + * + * Ordered queues dispatch work in parallel. This routine permits threads to + * perform in-order atomic operations within the context of an ordered + * flow. Upon return the caller is ordered with respect to other events in + * this ordered flow and may perform serial processing in that context. Once + * synchronized, the caller retains order synchronization until the specified + * event is subsequently enqueued to another queue or released from ordering + * via a call to odp_schedule_release_ordered(). + * + * @param ev The event whose order is to be locked + * + * @retval 0 Success. Order is now locked + * @retval <0 Failure. Specified event is not part of an ordered flow. + */ +int odp_schedule_order_sync(odp_event_t ev); + +/** * Copy order from one event to another * * This call copies the order associated with an event originating from an @@ -336,43 +354,6 @@ int odp_schedule_group_leave(odp_schedule_group_t group, int odp_schedule_group_count(odp_schedule_group_t group); /** - * Initialize ordered context lock - * - * Initialize an ordered queue context lock. The lock can be associated only - * with ordered queues and used only within an ordered synchronization context. - * - * @param queue Ordered queue - * @param lock Ordered context lock - * - * @retval 0 on success - * @retval <0 on failure - */ -int odp_schedule_olock_init(odp_queue_t queue, odp_schedule_olock_t *lock); - -/** - * Acquire ordered context lock - * - * This call is valid only when holding an ordered synchronization context. The - * lock is used to protect a critical section that is executed within an - * ordered context. Threads enter the critical section in the order determined - * by the context (source queue). Lock ordering is automatically skipped for - * threads that release the context instead of calling the lock. - * - * @param lock Ordered context lock - */ -void odp_schedule_olock_lock(odp_schedule_olock_t *lock); - -/** - * Release ordered context lock - * - * This call is valid only when holding an ordered synchronization context. - * Release a previously locked ordered context lock. - * - * @param lock Ordered context lock - */ -void odp_schedule_olock_unlock(odp_schedule_olock_t *lock); - -/** * @} */