From patchwork Tue Mar 17 09:53:28 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ciprian Barbu X-Patchwork-Id: 45870 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-la0-f72.google.com (mail-la0-f72.google.com [209.85.215.72]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 2437D2157E for ; Tue, 17 Mar 2015 09:54:10 +0000 (UTC) Received: by lamq1 with SMTP id q1sf815234lam.3 for ; Tue, 17 Mar 2015 02:54:09 -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=ATd4U2MMIa9DeM6LSDNLBr/WtH4E8U1c9QrgBZ2t6819MOrS6XGhTJkpooepHN4/UH eDl601qaRby9uUkKa5bwn7B58BeCfdmodlfQOp0kms2+8EvndV6TNiKmtfKgVZ807M/o omMKYjG4K4Mu4DcAK8ub0jZRQcXc82mECof5OfrCQyaQU0KKtOSR+tL6q+MiZVOtG0GK egtW6Rcy60i/5rCyWqyvjiyLQIBF7HkLJdEONqDwZmqTwBtb6kD6qgkg+FxpNhkypci4 7SRmloDnvCYA9qTMaprRolT5faRmE0/X/HiX2KE4lcCivLl/dswQ4SwHVPQhr9CpH3W+ 0FYg== X-Gm-Message-State: ALoCoQmK0XbOb8S+nBejSSBnKV771TPnJFQEaY+spTMKRCK4Nsw5Ps+HyekAICXadB/a+6uRM+j1 X-Received: by 10.112.98.38 with SMTP id ef6mr9050294lbb.3.1426586049055; Tue, 17 Mar 2015 02:54:09 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.42.137 with SMTP id o9ls13957lal.65.gmail; Tue, 17 Mar 2015 02:54:08 -0700 (PDT) X-Received: by 10.112.163.229 with SMTP id yl5mr58707555lbb.60.1426586048750; Tue, 17 Mar 2015 02:54:08 -0700 (PDT) Received: from mail-lb0-f182.google.com (mail-lb0-f182.google.com. [209.85.217.182]) by mx.google.com with ESMTPS id 7si10124892lai.138.2015.03.17.02.54.08 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 17 Mar 2015 02:54:08 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.182 as permitted sender) client-ip=209.85.217.182; Received: by lbbzq9 with SMTP id zq9so3094423lbb.0 for ; Tue, 17 Mar 2015 02:54:08 -0700 (PDT) X-Received: by 10.152.29.68 with SMTP id i4mr9452330lah.19.1426586048617; Tue, 17 Mar 2015 02:54:08 -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 h5csp393127lbj; Tue, 17 Mar 2015 02:54:08 -0700 (PDT) X-Received: by 10.140.233.78 with SMTP id e75mr81590257qhc.92.1426586047028; Tue, 17 Mar 2015 02:54:07 -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 17si10875882qhh.38.2015.03.17.02.54.05 (version=TLSv1 cipher=RC4-SHA bits=128/128); Tue, 17 Mar 2015 02:54:07 -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 1YXoCK-0004eK-1t; Tue, 17 Mar 2015 09:54:04 +0000 Received: from mail-lb0-f175.google.com ([209.85.217.175]) by ip-10-35-177-41.ec2.internal with esmtp (Exim 4.76) (envelope-from ) id 1YXoC6-0004dN-Hp for lng-odp@lists.linaro.org; Tue, 17 Mar 2015 09:53:50 +0000 Received: by lbbsy1 with SMTP id sy1so3084305lbb.1 for ; Tue, 17 Mar 2015 02:53:45 -0700 (PDT) X-Received: by 10.112.17.98 with SMTP id n2mr26618249lbd.40.1426586024813; Tue, 17 Mar 2015 02:53:44 -0700 (PDT) Received: from cipriantemp.enea.se (sestofw01.enea.se. [192.36.1.252]) by mx.google.com with ESMTPSA id x4sm2708712lba.22.2015.03.17.02.53.43 (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 17 Mar 2015 02:53:44 -0700 (PDT) From: Ciprian Barbu To: lng-odp@lists.linaro.org Date: Tue, 17 Mar 2015 11:53:28 +0200 Message-Id: <1426586009-21519-3-git-send-email-ciprian.barbu@linaro.org> X-Mailer: git-send-email 1.8.3.2 In-Reply-To: <1426586009-21519-1-git-send-email-ciprian.barbu@linaro.org> References: <1426586009-21519-1-git-send-email-ciprian.barbu@linaro.org> X-Topics: patch Subject: [lng-odp] [PATCHv2 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.182 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