From patchwork Fri Sep 15 10:00:18 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Github ODP bot X-Patchwork-Id: 112697 Delivered-To: patch@linaro.org Received: by 10.140.106.117 with SMTP id d108csp428585qgf; Fri, 15 Sep 2017 03:06:23 -0700 (PDT) X-Google-Smtp-Source: AOwi7QD6FPmUqYZkArnJlJNevlMXIYXde+isJG2viDaRPIp7EQQsKNIPpaLCjhl32kQffp+I0W5J X-Received: by 10.200.33.235 with SMTP id 40mr18445003qtz.185.1505469983311; Fri, 15 Sep 2017 03:06:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1505469983; cv=none; d=google.com; s=arc-20160816; b=ypRz4abo5pVfSTqpnfyarpplFvnCmamBb7REAh/oxrAEORAt4Lp2QPncEIDrmAO3WE GJE0gowC9roMyFygQ2WdPNeUKrggitcW/2WqcDLf/j2VHq+W8vW2zsePpvN/EsVUAMJ0 SV+E0l7on6xhFvrl0P3N9Cx7WBgu6bUZsEaGUXya/Kl2sD7eUzEncH84RSdHZnCinXG4 QKIbkWaWXZYB3TKKOvni+juTLcrE6JiNU4zK1qyXIyhrahPM6PIEdILIzNk1HfYiLa5i 07i/HSEInFEAXJrVd5G/1OpV9U0iFznkAVLVmr9OImyComKzXaIpyULU7mc8X3npI//6 7oqA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:subject:github-pr-num :references:in-reply-to:message-id:date:to:from:delivered-to :arc-authentication-results; bh=W6AKq3b4a03Nc2Df8tTl2FA+XQmv9URWiPNbbDy3wLM=; b=Td26cG3RE1EGSU7qKumRPO4xZfrx3GneimJ49nu9mhthy5+3+GSSh7k5hpfo5U8OMy wFbPo34o64z/xLtZqwI+/21re0RiF+MbTsg0iCEg6arsw2dGSiPI7TI5k6zkwbE5vJN3 AM73E15l3hlvrrGpUUyo+CZ0XGDcKbB0cAc6kCTQTck3pK9xCm5PXJ+pxzmvf8LxU0Ds aXOQRRvOC9lyQ365e92Z89qTF2+1MQnj9DPng6+9/H5zf/iZya5BU6COULw8E0qco6MU CWColNt0hnMQGil1adLxdyps0BM3lQKSzmUzeUmEeDKniTMVgtyHhTgYuSRO91RkMsfu 58Vg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of lng-odp-bounces@lists.linaro.org designates 54.225.227.206 as permitted sender) smtp.mailfrom=lng-odp-bounces@lists.linaro.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=yandex.ru Return-Path: Received: from lists.linaro.org (lists.linaro.org. [54.225.227.206]) by mx.google.com with ESMTP id c100si596859qkh.446.2017.09.15.03.06.23; Fri, 15 Sep 2017 03:06:23 -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; Authentication-Results: mx.google.com; spf=pass (google.com: domain of lng-odp-bounces@lists.linaro.org designates 54.225.227.206 as permitted sender) smtp.mailfrom=lng-odp-bounces@lists.linaro.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=yandex.ru Received: by lists.linaro.org (Postfix, from userid 109) id 0656C607C6; Fri, 15 Sep 2017 10:06:23 +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,FREEMAIL_FROM, RCVD_IN_DNSWL_LOW,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 DFA5E609DA; Fri, 15 Sep 2017 10:01:59 +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 DED2760C3E; Fri, 15 Sep 2017 10:01:52 +0000 (UTC) Received: from forward102p.mail.yandex.net (forward102p.mail.yandex.net [77.88.28.102]) by lists.linaro.org (Postfix) with ESMTPS id 7F57F609D6 for ; Fri, 15 Sep 2017 10:00:36 +0000 (UTC) Received: from mxback20j.mail.yandex.net (mxback20j.mail.yandex.net [IPv6:2a02:6b8:0:1619::114]) by forward102p.mail.yandex.net (Yandex) with ESMTP id 61B354301C70 for ; Fri, 15 Sep 2017 13:00:35 +0300 (MSK) Received: from smtp2j.mail.yandex.net (smtp2j.mail.yandex.net [2a02:6b8:0:801::ac]) by mxback20j.mail.yandex.net (nwsmtp/Yandex) with ESMTP id 4LYGH0QobK-0Z8i61nR; Fri, 15 Sep 2017 13:00:35 +0300 Received: by smtp2j.mail.yandex.net (nwsmtp/Yandex) with ESMTPSA id clr2IsS8eV-0YTqxt6P; Fri, 15 Sep 2017 13:00:34 +0300 (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits)) (Client certificate not present) From: Github ODP bot To: lng-odp@lists.linaro.org Date: Fri, 15 Sep 2017 13:00:18 +0300 Message-Id: <1505469621-12939-6-git-send-email-odpbot@yandex.ru> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1505469621-12939-1-git-send-email-odpbot@yandex.ru> References: <1505469621-12939-1-git-send-email-odpbot@yandex.ru> Github-pr-num: 160 Subject: [lng-odp] [PATCH API-NEXT v14 5/8] linux-generic: schedule: change order lock function signature X-BeenThere: lng-odp@lists.linaro.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: "The OpenDataPlane \(ODP\) List" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: lng-odp-bounces@lists.linaro.org Sender: "lng-odp" From: Balasubramanian Manoharan change function param signature from unsigned to uint32_t Signed-off-by: Balasubramanian Manoharan --- /** Email created from pull request 160 (bala-manoharan:api_sched_order_lock) ** https://github.com/Linaro/odp/pull/160 ** Patch: https://github.com/Linaro/odp/pull/160.patch ** Base sha: 6b6253c30f88c80bf632436ff06c1b000860a2f1 ** Merge commit sha: 236aa5fbfddcbccd5bf62c87fea274b272bfec72 **/ platform/linux-generic/include/odp_schedule_if.h | 6 +++--- platform/linux-generic/include/odp_schedule_scalable_ordered.h | 2 +- platform/linux-generic/odp_schedule.c | 10 +++++----- platform/linux-generic/odp_schedule_if.c | 4 ++-- platform/linux-generic/odp_schedule_iquery.c | 8 ++++---- platform/linux-generic/odp_schedule_scalable.c | 6 +++--- platform/linux-generic/odp_schedule_scalable_ordered.c | 2 +- platform/linux-generic/odp_schedule_sp.c | 6 +++--- 8 files changed, 22 insertions(+), 22 deletions(-) diff --git a/platform/linux-generic/include/odp_schedule_if.h b/platform/linux-generic/include/odp_schedule_if.h index 657993b13..3815a27e6 100644 --- a/platform/linux-generic/include/odp_schedule_if.h +++ b/platform/linux-generic/include/odp_schedule_if.h @@ -34,7 +34,7 @@ typedef int (*schedule_init_local_fn_t)(void); typedef int (*schedule_term_local_fn_t)(void); typedef void (*schedule_order_lock_fn_t)(void); typedef void (*schedule_order_unlock_fn_t)(void); -typedef unsigned (*schedule_max_ordered_locks_fn_t)(void); +typedef uint32_t (*schedule_max_ordered_locks_fn_t)(void); typedef void (*schedule_save_context_fn_t)(uint32_t queue_index); typedef struct schedule_fn_t { @@ -93,8 +93,8 @@ typedef struct { int (*schedule_group_thrmask)(odp_schedule_group_t, odp_thrmask_t *); int (*schedule_group_info)(odp_schedule_group_t, odp_schedule_group_info_t *); - void (*schedule_order_lock)(unsigned); - void (*schedule_order_unlock)(unsigned); + void (*schedule_order_lock)(uint32_t); + void (*schedule_order_unlock)(uint32_t); } schedule_api_t; diff --git a/platform/linux-generic/include/odp_schedule_scalable_ordered.h b/platform/linux-generic/include/odp_schedule_scalable_ordered.h index 1c365a2b0..f88f973c6 100644 --- a/platform/linux-generic/include/odp_schedule_scalable_ordered.h +++ b/platform/linux-generic/include/odp_schedule_scalable_ordered.h @@ -79,7 +79,7 @@ typedef struct reorder_window { uint32_t tail; uint32_t turn; uint32_t olock[CONFIG_QUEUE_MAX_ORD_LOCKS]; - uint16_t lock_count; + uint32_t lock_count; /* Reorder contexts in this window */ reorder_context_t *ring[RWIN_SIZE]; } reorder_window_t; diff --git a/platform/linux-generic/odp_schedule.c b/platform/linux-generic/odp_schedule.c index 5b9407624..e6fbd5c65 100644 --- a/platform/linux-generic/odp_schedule.c +++ b/platform/linux-generic/odp_schedule.c @@ -250,7 +250,7 @@ typedef struct { int prio; int queue_per_prio; int sync; - unsigned order_lock_count; + uint32_t order_lock_count; } queue[ODP_CONFIG_QUEUES]; struct { @@ -465,7 +465,7 @@ static inline int grp_update_tbl(void) return num; } -static unsigned schedule_max_ordered_locks(void) +static uint32_t schedule_max_ordered_locks(void) { return CONFIG_QUEUE_MAX_ORD_LOCKS; } @@ -699,7 +699,7 @@ static inline void ordered_stash_release(void) static inline void release_ordered(void) { uint32_t qi; - unsigned i; + uint32_t i; qi = sched_local.ordered.src_queue; @@ -1100,7 +1100,7 @@ static void order_unlock(void) { } -static void schedule_order_lock(unsigned lock_index) +static void schedule_order_lock(uint32_t lock_index) { odp_atomic_u64_t *ord_lock; uint32_t queue_index; @@ -1127,7 +1127,7 @@ static void schedule_order_lock(unsigned lock_index) } } -static void schedule_order_unlock(unsigned lock_index) +static void schedule_order_unlock(uint32_t lock_index) { odp_atomic_u64_t *ord_lock; uint32_t queue_index; diff --git a/platform/linux-generic/odp_schedule_if.c b/platform/linux-generic/odp_schedule_if.c index e56e3722b..ff664420f 100644 --- a/platform/linux-generic/odp_schedule_if.c +++ b/platform/linux-generic/odp_schedule_if.c @@ -120,12 +120,12 @@ int odp_schedule_group_info(odp_schedule_group_t group, return sched_api->schedule_group_info(group, info); } -void odp_schedule_order_lock(unsigned lock_index) +void odp_schedule_order_lock(uint32_t lock_index) { return sched_api->schedule_order_lock(lock_index); } -void odp_schedule_order_unlock(unsigned lock_index) +void odp_schedule_order_unlock(uint32_t lock_index) { return sched_api->schedule_order_unlock(lock_index); } diff --git a/platform/linux-generic/odp_schedule_iquery.c b/platform/linux-generic/odp_schedule_iquery.c index b81e5dab1..974a950f2 100644 --- a/platform/linux-generic/odp_schedule_iquery.c +++ b/platform/linux-generic/odp_schedule_iquery.c @@ -1150,7 +1150,7 @@ static inline void ordered_stash_release(void) static inline void release_ordered(void) { uint32_t qi; - unsigned i; + uint32_t i; qi = thread_local.ordered.src_queue; @@ -1252,7 +1252,7 @@ static void order_unlock(void) { } -static void schedule_order_lock(unsigned lock_index) +static void schedule_order_lock(uint32_t lock_index) { odp_atomic_u64_t *ord_lock; uint32_t queue_index; @@ -1279,7 +1279,7 @@ static void schedule_order_lock(unsigned lock_index) } } -static void schedule_order_unlock(unsigned lock_index) +static void schedule_order_unlock(uint32_t lock_index) { odp_atomic_u64_t *ord_lock; uint32_t queue_index; @@ -1296,7 +1296,7 @@ static void schedule_order_unlock(unsigned lock_index) odp_atomic_store_rel_u64(ord_lock, thread_local.ordered.ctx + 1); } -static unsigned schedule_max_ordered_locks(void) +static uint32_t schedule_max_ordered_locks(void) { return CONFIG_QUEUE_MAX_ORD_LOCKS; } diff --git a/platform/linux-generic/odp_schedule_scalable.c b/platform/linux-generic/odp_schedule_scalable.c index 765326e8e..86018b0a2 100644 --- a/platform/linux-generic/odp_schedule_scalable.c +++ b/platform/linux-generic/odp_schedule_scalable.c @@ -990,7 +990,7 @@ static int _schedule(odp_queue_t *from, odp_event_t ev[], int num_evts) /******************************************************************************/ -static void schedule_order_lock(unsigned lock_index) +static void schedule_order_lock(uint32_t lock_index) { struct reorder_context *rctx = sched_ts->rctx; @@ -1010,7 +1010,7 @@ static void schedule_order_lock(unsigned lock_index) } } -static void schedule_order_unlock(unsigned lock_index) +static void schedule_order_unlock(uint32_t lock_index) { struct reorder_context *rctx; @@ -1936,7 +1936,7 @@ static void order_unlock(void) { } -static unsigned schedule_max_ordered_locks(void) +static uint32_t schedule_max_ordered_locks(void) { return CONFIG_QUEUE_MAX_ORD_LOCKS; } diff --git a/platform/linux-generic/odp_schedule_scalable_ordered.c b/platform/linux-generic/odp_schedule_scalable_ordered.c index 80ff2490b..9396cd031 100644 --- a/platform/linux-generic/odp_schedule_scalable_ordered.c +++ b/platform/linux-generic/odp_schedule_scalable_ordered.c @@ -220,7 +220,7 @@ static inline void olock_unlock(const reorder_context_t *rctx, static void olock_release(const reorder_context_t *rctx) { reorder_window_t *rwin; - int i; + uint32_t i; rwin = rctx->rwin; diff --git a/platform/linux-generic/odp_schedule_sp.c b/platform/linux-generic/odp_schedule_sp.c index 05241275d..62efe1bb8 100644 --- a/platform/linux-generic/odp_schedule_sp.c +++ b/platform/linux-generic/odp_schedule_sp.c @@ -243,7 +243,7 @@ static int term_local(void) return 0; } -static unsigned max_ordered_locks(void) +static uint32_t max_ordered_locks(void) { return NUM_ORDERED_LOCKS; } @@ -809,12 +809,12 @@ static int schedule_group_info(odp_schedule_group_t group, return 0; } -static void schedule_order_lock(unsigned lock_index) +static void schedule_order_lock(uint32_t lock_index) { (void)lock_index; } -static void schedule_order_unlock(unsigned lock_index) +static void schedule_order_unlock(uint32_t lock_index) { (void)lock_index; }