From patchwork Thu Sep 3 00:07:18 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bill Fischofer X-Patchwork-Id: 53000 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-la0-f70.google.com (mail-la0-f70.google.com [209.85.215.70]) by patches.linaro.org (Postfix) with ESMTPS id 17B2E23002 for ; Thu, 3 Sep 2015 00:09:44 +0000 (UTC) Received: by laeb10 with SMTP id b10sf10311219lae.1 for ; Wed, 02 Sep 2015 17:09:42 -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=iwxQp9Gjn3joxxbRmg10p7Qe6BHG1zXfeW6yMO0q1s8=; b=Mr0sg8FapfJ3F0yg4YFprT4Lc3e+Q+HPCjft8EgHO4olsSsHtnijljmuIQ36WmlZmg o5w9bMufiuyC7+WRpo4u7pV/kS873HaXaLhJoUglJs5kO0wGY0DCQ227PJ7LjE3BqwRE KVRrIfVgiuw3Pn26iu13mTUaQ0eslgOTldWp+rl8AuU4Uwadmoj7tn5nBgAT9aEFMUYv /KhCIY0EClVMGbJtLp12863oAL6AHBTckHJ4FA2NUQdrnLEUBrRlYhimrop5iX/CcFEK O9ZZcRR8klILCMHmfPyowbbPS4GB3J7LJFZiGrz1khLo2S1jl+IQTZ+mszWbCeewrxMr g5fg== X-Gm-Message-State: ALoCoQkzNg9E4lnWmlIDMAHLlg9B0G2jKEYdwWMkTNsZceZRay4/+sX9oqElB5u9MObFL/0DQVms X-Received: by 10.180.83.226 with SMTP id t2mr1755571wiy.5.1441238982839; Wed, 02 Sep 2015 17:09:42 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.3.194 with SMTP id e2ls809lae.49.gmail; Wed, 02 Sep 2015 17:09:42 -0700 (PDT) X-Received: by 10.152.26.163 with SMTP id m3mr18838923lag.86.1441238982536; Wed, 02 Sep 2015 17:09:42 -0700 (PDT) Received: from mail-la0-f50.google.com (mail-la0-f50.google.com. [209.85.215.50]) by mx.google.com with ESMTPS id py9si21376038lbb.165.2015.09.02.17.09.42 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 02 Sep 2015 17:09:42 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.50 as permitted sender) client-ip=209.85.215.50; Received: by laeb10 with SMTP id b10so18279392lae.1 for ; Wed, 02 Sep 2015 17:09:42 -0700 (PDT) X-Received: by 10.152.18.194 with SMTP id y2mr9397781lad.88.1441238982453; Wed, 02 Sep 2015 17:09:42 -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.164.42 with SMTP id yn10csp909949lbb; Wed, 2 Sep 2015 17:09:41 -0700 (PDT) X-Received: by 10.140.82.18 with SMTP id g18mr1780514qgd.41.1441238981285; Wed, 02 Sep 2015 17:09:41 -0700 (PDT) Received: from lists.linaro.org (lists.linaro.org. [54.225.227.206]) by mx.google.com with ESMTP id w126si27810626qha.64.2015.09.02.17.09.40; Wed, 02 Sep 2015 17:09:41 -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 5016561A0A; Thu, 3 Sep 2015 00:09:40 +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=-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 [127.0.0.1] (localhost [127.0.0.1]) by lists.linaro.org (Postfix) with ESMTP id 97AE561A15; Thu, 3 Sep 2015 00:07: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 C1D1861A0A; Thu, 3 Sep 2015 00:07:30 +0000 (UTC) Received: from mail-ob0-f172.google.com (mail-ob0-f172.google.com [209.85.214.172]) by lists.linaro.org (Postfix) with ESMTPS id 1D85B61A01 for ; Thu, 3 Sep 2015 00:07:29 +0000 (UTC) Received: by obbbh8 with SMTP id bh8so22318283obb.0 for ; Wed, 02 Sep 2015 17:07:28 -0700 (PDT) X-Received: by 10.182.19.228 with SMTP id i4mr23005916obe.82.1441238848580; Wed, 02 Sep 2015 17:07:28 -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 k5sm15601814oev.16.2015.09.02.17.07.28 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 02 Sep 2015 17:07:28 -0700 (PDT) From: Bill Fischofer To: lng-odp@lists.linaro.org, maxim.uvarov@linaro.org Date: Wed, 2 Sep 2015 19:07:18 -0500 Message-Id: <1441238841-25105-5-git-send-email-bill.fischofer@linaro.org> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1441238841-25105-1-git-send-email-bill.fischofer@linaro.org> References: <1441238841-25105-1-git-send-email-bill.fischofer@linaro.org> X-Topics: patch Subject: [lng-odp] [PATCH 4/7] linux-generic: queue: add destroy check for ordered queues 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.50 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 Ensure that the reorder queue associated with ordered queues is empty as part of odp_queue_destroy() processing Signed-off-by: Bill Fischofer --- platform/linux-generic/odp_queue.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/platform/linux-generic/odp_queue.c b/platform/linux-generic/odp_queue.c index bc59d88..87c5f91 100644 --- a/platform/linux-generic/odp_queue.c +++ b/platform/linux-generic/odp_queue.c @@ -274,6 +274,11 @@ int odp_queue_destroy(odp_queue_t handle) ODP_ERR("queue \"%s\" not empty\n", queue->s.name); return -1; } + if (queue_is_ordered(queue) && queue->s.reorder_head) { + UNLOCK(&queue->s.lock); + ODP_ERR("queue \"%s\" reorder queue not empty\n", + queue->s.name); + } switch (queue->s.status) { case QUEUE_STATUS_READY: