diff mbox

[API-NEXT,1/3] linux-gen: scheduler: cache_order_info with explicit event

Message ID 1480312009-32464-2-git-send-email-yi.he@linaro.org
State New
Headers show

Commit Message

Yi He Nov. 28, 2016, 5:46 a.m. UTC
Signed-off-by: Yi He <yi.he@linaro.org>

---
 platform/linux-generic/include/odp_schedule_internal.h | 2 +-
 platform/linux-generic/odp_schedule.c                  | 2 +-
 platform/linux-generic/odp_schedule_ordered.c          | 3 +--
 3 files changed, 3 insertions(+), 4 deletions(-)

-- 
2.7.4
diff mbox

Patch

diff --git a/platform/linux-generic/include/odp_schedule_internal.h b/platform/linux-generic/include/odp_schedule_internal.h
index 02637c2..ede4723 100644
--- a/platform/linux-generic/include/odp_schedule_internal.h
+++ b/platform/linux-generic/include/odp_schedule_internal.h
@@ -35,7 +35,7 @@  typedef struct {
 
 extern __thread sched_local_t sched_local;
 
-void cache_order_info(uint32_t queue_index);
+void cache_order_info(uint32_t queue_index, odp_event_t ev);
 int release_order(void *origin_qe, uint64_t order,
 		  odp_pool_t pool, int enq_called);
 
diff --git a/platform/linux-generic/odp_schedule.c b/platform/linux-generic/odp_schedule.c
index dfc9555..1ef85ac 100644
--- a/platform/linux-generic/odp_schedule.c
+++ b/platform/linux-generic/odp_schedule.c
@@ -630,7 +630,7 @@  static int do_schedule(odp_queue_t *out_queue, odp_event_t out_ev[],
 				ring_enq(ring, PRIO_QUEUE_MASK, qi);
 
 				/* Cache order info about this event */
-				cache_order_info(qi);
+				cache_order_info(qi, sched_local.ev_stash[0]);
 			} else if (sched_cb_queue_is_atomic(qi)) {
 				/* Hold queue during atomic access */
 				sched_local.queue_index = qi;
diff --git a/platform/linux-generic/odp_schedule_ordered.c b/platform/linux-generic/odp_schedule_ordered.c
index 5574faf..bfa7fd6 100644
--- a/platform/linux-generic/odp_schedule_ordered.c
+++ b/platform/linux-generic/odp_schedule_ordered.c
@@ -800,11 +800,10 @@  void schedule_order_unlock(unsigned lock_index)
 	odp_atomic_fetch_inc_u64(&origin_qe->s.sync_out[lock_index]);
 }
 
-void cache_order_info(uint32_t queue_index)
+void cache_order_info(uint32_t queue_index, odp_event_t ev)
 {
 	uint32_t i;
 	queue_entry_t *qe = get_qentry(queue_index);
-	odp_event_t ev = sched_local.ev_stash[0];
 	odp_buffer_hdr_t *buf_hdr = buf_hdl_to_hdr(odp_buffer_from_event(ev));
 
 	sched_local.origin_qe = qe;