From patchwork Tue Dec 16 09:54:27 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ciprian Barbu X-Patchwork-Id: 42311 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 2D6FD2456A for ; Tue, 16 Dec 2014 09:55:22 +0000 (UTC) Received: by mail-lb0-f199.google.com with SMTP id u10sf8375802lbd.10 for ; Tue, 16 Dec 2014 01:55:21 -0800 (PST) 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=5jyvp/LXK2N+/o9vB51UYCmgyMnvAN/LdZmMWH7Qn6s=; b=eZUD/olcdhi7Ewhjkm7bYR6p6FLwMEbE/0UMuLJuCpVnrNxhjByNgZfY6qTzBgT1NF rBy8kdhYRcHRRZtrL2JE1IBWzCbgVC7psFRBj2SCt9sYXfc3tagJBCFG+AOencY7jxhd HTmgf9EkhoQi3owZzP7+Va2VFVQEP8GpTqqp3PUB0NFh8JH1FS5qvpXwMt26L59PmddD V2JuiZDgCjxqhcl8cwq7Lf+krn0uGcCvAjY3ooC5/2oM6UXBdgD5ITsdsCwtAMASw8uo 7zx0KKa2dQijU3jt3EsMRADisI7R35DQZZQvkQnmYVc8YxwkobuFmYLY4J2EalsEWdfx Q+PQ== X-Gm-Message-State: ALoCoQlBBDzmxrgh9wygzl5WrPFVw/U4VmhpmFx4nsHNl8s7vzJUBlazHRSRtz23sJOx5mgHXjJN X-Received: by 10.112.42.104 with SMTP id n8mr130332lbl.19.1418723721164; Tue, 16 Dec 2014 01:55:21 -0800 (PST) X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.87.50 with SMTP id u18ls850721laz.96.gmail; Tue, 16 Dec 2014 01:55:20 -0800 (PST) X-Received: by 10.152.87.67 with SMTP id v3mr33911465laz.97.1418723720889; Tue, 16 Dec 2014 01:55:20 -0800 (PST) Received: from mail-la0-f43.google.com (mail-la0-f43.google.com. [209.85.215.43]) by mx.google.com with ESMTPS id q5si267832lbp.93.2014.12.16.01.55.20 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 16 Dec 2014 01:55:20 -0800 (PST) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.43 as permitted sender) client-ip=209.85.215.43; Received: by mail-la0-f43.google.com with SMTP id s18so10874216lam.2 for ; Tue, 16 Dec 2014 01:55:20 -0800 (PST) X-Received: by 10.152.25.129 with SMTP id c1mr35346747lag.9.1418723720803; Tue, 16 Dec 2014 01:55:20 -0800 (PST) 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.142.69 with SMTP id ru5csp982759lbb; Tue, 16 Dec 2014 01:55:19 -0800 (PST) X-Received: by 10.140.101.204 with SMTP id u70mr48731189qge.0.1418723719182; Tue, 16 Dec 2014 01:55:19 -0800 (PST) Received: from ip-10-35-177-41.ec2.internal (lists.linaro.org. [54.225.227.206]) by mx.google.com with ESMTPS id n4si286669qci.46.2014.12.16.01.55.18 (version=TLSv1 cipher=RC4-SHA bits=128/128); Tue, 16 Dec 2014 01:55:19 -0800 (PST) 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 1Y0oqa-0006vk-Me; Tue, 16 Dec 2014 09:55:16 +0000 Received: from mail-la0-f44.google.com ([209.85.215.44]) by ip-10-35-177-41.ec2.internal with esmtp (Exim 4.76) (envelope-from ) id 1Y0oqM-0006sA-K8 for lng-odp@lists.linaro.org; Tue, 16 Dec 2014 09:55:02 +0000 Received: by mail-la0-f44.google.com with SMTP id gd6so11088764lab.17 for ; Tue, 16 Dec 2014 01:54:57 -0800 (PST) X-Received: by 10.112.204.233 with SMTP id lb9mr10959156lbc.43.1418723697016; Tue, 16 Dec 2014 01:54:57 -0800 (PST) Received: from cipriantemp.enea.se (sestofw01.enea.se. [192.36.1.252]) by mx.google.com with ESMTPSA id l9sm92457lae.0.2014.12.16.01.54.55 (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 16 Dec 2014 01:54:56 -0800 (PST) From: Ciprian Barbu To: lng-odp@lists.linaro.org, petri.savolainen@nsn.com, ola.liljedahl@linaro.org Date: Tue, 16 Dec 2014 11:54:27 +0200 Message-Id: <1418723669-10161-3-git-send-email-ciprian.barbu@linaro.org> X-Mailer: git-send-email 1.8.3.2 In-Reply-To: <1418723669-10161-1-git-send-email-ciprian.barbu@linaro.org> References: <1418723669-10161-1-git-send-email-ciprian.barbu@linaro.org> Subject: [lng-odp] [RFC 2/4] platform: implement odp_queue_sched_prio and odp_queue_sched_group 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.43 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/odp_queue.c | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/platform/linux-generic/odp_queue.c b/platform/linux-generic/odp_queue.c index a7c5e42..36ca430 100644 --- a/platform/linux-generic/odp_queue.c +++ b/platform/linux-generic/odp_queue.c @@ -146,6 +146,30 @@ odp_schedule_sync_t odp_queue_sched_type(odp_queue_t handle) return queue->s.param.sched.sync; } +odp_schedule_prio_t odp_queue_sched_prio(odp_queue_t handle) +{ + queue_entry_t *queue; + + if (handle == ODP_QUEUE_INVALID) + ODP_ABORT("Ivalid queue handle\n"); + + queue = queue_to_qentry(handle); + + return queue->s.param.sched.prio; +} + +odp_schedule_group_t odp_queue_sched_group(odp_queue_t handle) +{ + queue_entry_t *queue; + + if (handle == ODP_QUEUE_INVALID) + ODP_ABORT("Ivalid queue handle\n"); + + queue = queue_to_qentry(handle); + + return queue->s.param.sched.group; +} + odp_queue_t odp_queue_create(const char *name, odp_queue_type_t type, odp_queue_param_t *param) {