From patchwork Wed Mar 18 11:36:33 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ciprian Barbu X-Patchwork-Id: 45939 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-la0-f71.google.com (mail-la0-f71.google.com [209.85.215.71]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 5B0D52153C for ; Wed, 18 Mar 2015 11:37:16 +0000 (UTC) Received: by lamq1 with SMTP id q1sf6811839lam.3 for ; Wed, 18 Mar 2015 04:37:15 -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: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=1WeGzr3FWYcY8uWlZru4XijQUJBeHb3V+K6eVMdpcAE=; b=gnkMK0Ne3tDRVctpQ+HBofwuke/8f4KvJ0w8lJTk/5RhutwGz9PTQrtx4R2eWYWfpu kDRihpA8FaYwUJX3vpk8uI61nosvEph5bhAkG0DP5SGjVs0cMlSx0FfcNYgAsQj1PFwU s9rFedvjgb7BD9olEiHeYgYB/XcDnMIAM359bb8Lo0xmDl1+sSQMNN9O7NsBHfcNoTvF ei7J4lFgI/yt4B9qlR8ez6iWYNKwCPIltEmUYaUDxy0njk45xSeC8++vuiVrIT+EezLn TxAiQb4GrfP7rS8na3JBibDyJo1P1q3/GRjomWsp95OTWIP7sG0ZNKm0yaBdUFVugYVS zxdA== X-Gm-Message-State: ALoCoQmKO4FxVpRBu4g8Kx9m28xO8XwN37FBpDR/ELMQ0NrOCBc0AoDf7cB5cd2QAY3YutMDa7Dx X-Received: by 10.112.162.135 with SMTP id ya7mr10842435lbb.14.1426678634943; Wed, 18 Mar 2015 04:37:14 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.20.67 with SMTP id l3ls143570lae.93.gmail; Wed, 18 Mar 2015 04:37:14 -0700 (PDT) X-Received: by 10.152.184.100 with SMTP id et4mr64151976lac.8.1426678634551; Wed, 18 Mar 2015 04:37:14 -0700 (PDT) Received: from mail-lb0-f180.google.com (mail-lb0-f180.google.com. [209.85.217.180]) by mx.google.com with ESMTPS id j8si12683587lag.163.2015.03.18.04.37.14 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 18 Mar 2015 04:37:14 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.180 as permitted sender) client-ip=209.85.217.180; Received: by lbbsy1 with SMTP id sy1so27313977lbb.1 for ; Wed, 18 Mar 2015 04:37:14 -0700 (PDT) X-Received: by 10.112.8.101 with SMTP id q5mr58417875lba.19.1426678634335; Wed, 18 Mar 2015 04:37:14 -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.35.133 with SMTP id h5csp1095180lbj; Wed, 18 Mar 2015 04:37:13 -0700 (PDT) X-Received: by 10.140.164.6 with SMTP id k6mr91130802qhk.61.1426678632986; Wed, 18 Mar 2015 04:37:12 -0700 (PDT) Received: from ip-10-35-177-41.ec2.internal (lists.linaro.org. [54.225.227.206]) by mx.google.com with ESMTPS id k35si16297629qkh.63.2015.03.18.04.37.10 (version=TLSv1 cipher=RC4-SHA bits=128/128); Wed, 18 Mar 2015 04:37:12 -0700 (PDT) Received-SPF: none (google.com: lng-odp-bounces@lists.linaro.org does not designate permitted sender hosts) client-ip=54.225.227.206; Received: from localhost ([127.0.0.1] helo=ip-10-35-177-41.ec2.internal) by ip-10-35-177-41.ec2.internal with esmtp (Exim 4.76) (envelope-from ) id 1YYCHc-0001lW-8v; Wed, 18 Mar 2015 11:37:08 +0000 Received: from mail-la0-f47.google.com ([209.85.215.47]) by ip-10-35-177-41.ec2.internal with esmtp (Exim 4.76) (envelope-from ) id 1YYCHP-0001kq-Se for lng-odp@lists.linaro.org; Wed, 18 Mar 2015 11:36:56 +0000 Received: by labjg1 with SMTP id jg1so33372086lab.2 for ; Wed, 18 Mar 2015 04:36:50 -0700 (PDT) X-Received: by 10.152.179.172 with SMTP id dh12mr37257917lac.23.1426678610401; Wed, 18 Mar 2015 04:36:50 -0700 (PDT) Received: from cipriantemp.enea.se (sestofw01.enea.se. [192.36.1.252]) by mx.google.com with ESMTPSA id pd1sm2551936lbc.9.2015.03.18.04.36.49 (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 18 Mar 2015 04:36:49 -0700 (PDT) From: Ciprian Barbu To: lng-odp@lists.linaro.org Date: Wed, 18 Mar 2015 13:36:33 +0200 Message-Id: <1426678594-29398-3-git-send-email-ciprian.barbu@linaro.org> X-Mailer: git-send-email 1.8.3.2 In-Reply-To: <1426678594-29398-1-git-send-email-ciprian.barbu@linaro.org> References: <1426678594-29398-1-git-send-email-ciprian.barbu@linaro.org> X-Topics: patch Subject: [lng-odp] [PATCHv4 2/3] linux-generic: queue: add queue_is_destroyed internal call X-BeenThere: lng-odp@lists.linaro.org X-Mailman-Version: 2.1.14 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-bounces@lists.linaro.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: ciprian.barbu@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.180 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: Ciprian Barbu --- platform/linux-generic/include/odp_queue_internal.h | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/platform/linux-generic/include/odp_queue_internal.h b/platform/linux-generic/include/odp_queue_internal.h index 65aae14..9a0e94f 100644 --- a/platform/linux-generic/include/odp_queue_internal.h +++ b/platform/linux-generic/include/odp_queue_internal.h @@ -139,6 +139,15 @@ static inline int queue_is_sched(odp_queue_t handle) return ((queue->s.status == QUEUE_STATUS_SCHED) && (queue->s.pktin != ODP_PKTIO_INVALID)); } + +static inline int queue_is_destroyed(odp_queue_t handle) +{ + queue_entry_t *queue; + + queue = queue_to_qentry(handle); + + return (queue->s.status == QUEUE_STATUS_DESTROYED); +} #ifdef __cplusplus } #endif