diff mbox series

[API-NEXT,v11,9/12] linux-generic: schedule: change order lock function signature

Message ID 1505401213-7265-10-git-send-email-odpbot@yandex.ru
State Superseded
Headers show
Series [API-NEXT,v11,1/12] helper: move include files to helper/include | expand

Commit Message

Github ODP bot Sept. 14, 2017, 3 p.m. UTC
From: Balasubramanian Manoharan <bala.manoharan@linaro.org>


change function param signature from unsigned to uint32_t

Signed-off-by: Balasubramanian Manoharan <bala.manoharan@linaro.org>

---
/** 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: 438a3bab5df9c05dc06f0b4e4b22c0a7db0864fd
 **/
 platform/linux-generic/include/odp_schedule_if.h          |  6 +++---
 .../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              | 15 +++++++++++----
 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, 29 insertions(+), 22 deletions(-)
diff mbox series

Patch

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..850c5d8b7 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,14 @@  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 void schedule_order_unlock_lock(uint32_t unlock_index,
+				       uint32_t lock_index)
+{
+	schedule_order_unlock(unlock_index);
+	schedule_order_lock(lock_index);
+}
+
+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;
 }