From patchwork Wed Mar 18 10:16:38 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ciprian Barbu X-Patchwork-Id: 45924 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-lb0-f199.google.com (mail-lb0-f199.google.com [209.85.217.199]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 0F2422153C for ; Wed, 18 Mar 2015 10:17:21 +0000 (UTC) Received: by lbdu10 with SMTP id u10sf1991134lbd.3 for ; Wed, 18 Mar 2015 03:17:19 -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=Gd9YV/x5IhyVaYHD5Ju3TT+Etwk5I5bX4Nn/+4F8qpZmld/XIxWnJcEeTWCd0lqZfr 7Z6UEbhk6WpZpsl7+f/PELF9pEc9+grjRyiPukHBn2k8C1oS9an/G4A3TR3eZFm4Up+R UFfGddbd7OODxEE+0jqI5TNEvJZrKXNG4ppNRZQ9SXHKtghycnNylin/DC/lIgOlHN5g SejOLNQpf1WV/D5twDgHIvxEz9Jr73RirKTCPXilWjT/9A8U1j1dbpZndZMRIHTjQCqK MHaSHgL4xRUdBNoJ/G+dAGOl/mvikj1gmbAkIT1XYeeooSJw0RsSecpm2yDfkISxQrr2 V3Wg== X-Gm-Message-State: ALoCoQkyX2vn2yY8kZNCi0nwzG/Q1NENaoHuqbcWFguU1RjaqPjyQVZnk/s9gprverYj06gwJEYr X-Received: by 10.112.125.67 with SMTP id mo3mr9152500lbb.6.1426673839928; Wed, 18 Mar 2015 03:17:19 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.21.233 with SMTP id y9ls137064lae.9.gmail; Wed, 18 Mar 2015 03:17:19 -0700 (PDT) X-Received: by 10.152.116.43 with SMTP id jt11mr62190110lab.30.1426673839783; Wed, 18 Mar 2015 03:17:19 -0700 (PDT) Received: from mail-la0-f47.google.com (mail-la0-f47.google.com. [209.85.215.47]) by mx.google.com with ESMTPS id ul4si12547251lbb.171.2015.03.18.03.17.19 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 18 Mar 2015 03:17:19 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.47 as permitted sender) client-ip=209.85.215.47; Received: by labjg1 with SMTP id jg1so31780816lab.2 for ; Wed, 18 Mar 2015 03:17:19 -0700 (PDT) X-Received: by 10.152.8.15 with SMTP id n15mr36457480laa.41.1426673839695; Wed, 18 Mar 2015 03:17:19 -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 h5csp1055892lbj; Wed, 18 Mar 2015 03:17:19 -0700 (PDT) X-Received: by 10.140.44.4 with SMTP id f4mr84500281qga.3.1426673837852; Wed, 18 Mar 2015 03:17:17 -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 h198si16092118qhc.127.2015.03.18.03.17.16 (version=TLSv1 cipher=RC4-SHA bits=128/128); Wed, 18 Mar 2015 03:17:17 -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 1YYB2I-00060y-M4; Wed, 18 Mar 2015 10:17:14 +0000 Received: from mail-lb0-f169.google.com ([209.85.217.169]) by ip-10-35-177-41.ec2.internal with esmtp (Exim 4.76) (envelope-from ) id 1YYB27-000608-EX for lng-odp@lists.linaro.org; Wed, 18 Mar 2015 10:17:03 +0000 Received: by lbblx11 with SMTP id lx11so3782238lbb.3 for ; Wed, 18 Mar 2015 03:16:57 -0700 (PDT) X-Received: by 10.112.140.74 with SMTP id re10mr64526512lbb.80.1426673817271; Wed, 18 Mar 2015 03:16:57 -0700 (PDT) Received: from cipriantemp.enea.se (sestofw01.enea.se. [192.36.1.252]) by mx.google.com with ESMTPSA id bm5sm1681413lbb.25.2015.03.18.03.16.56 (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 18 Mar 2015 03:16:56 -0700 (PDT) From: Ciprian Barbu To: lng-odp@lists.linaro.org Date: Wed, 18 Mar 2015 12:16:38 +0200 Message-Id: <1426673799-28116-3-git-send-email-ciprian.barbu@linaro.org> X-Mailer: git-send-email 1.8.3.2 In-Reply-To: <1426673799-28116-1-git-send-email-ciprian.barbu@linaro.org> References: <1426673799-28116-1-git-send-email-ciprian.barbu@linaro.org> X-Topics: patch Subject: [lng-odp] [PATCHv3 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.215.47 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