aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBill Fischofer <bill.fischofer@linaro.org>2015-09-03 10:16:34 -0500
committerMaxim Uvarov <maxim.uvarov@linaro.org>2015-09-03 19:29:09 +0300
commitef7861b1fdb7e0ff689a175eca2cc81e1f8d1cfc (patch)
tree0e71491723e8aba3b80b73b1b32efa66be4079d7
parent57ab1d5316774c1befc201af9fae017bd2ad5965 (diff)
linux-generic: schedule: correct scheduling for ordered queues
Ordered queues must be rescheduled before caching context locally to avoid contaminating the scheduler poll queues with false ordering info. Signed-off-by: Bill Fischofer <bill.fischofer@linaro.org> Reviewed-and-Tested-by: Maxim Uvarov <maxim.uvarov@linaro.org> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
-rw-r--r--platform/linux-generic/odp_schedule.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/platform/linux-generic/odp_schedule.c b/platform/linux-generic/odp_schedule.c
index d2543ad..a88ba4d 100644
--- a/platform/linux-generic/odp_schedule.c
+++ b/platform/linux-generic/odp_schedule.c
@@ -544,14 +544,16 @@ static int schedule(odp_queue_t *out_queue, odp_event_t out_ev[],
ret = copy_events(out_ev, max_num);
if (queue_is_ordered(qe)) {
+ /* Continue scheduling ordered queues */
+ if (odp_queue_enq(pri_q, ev))
+ ODP_ABORT("schedule failed\n");
+ /* Cache order info about this event */
sched_local.origin_qe = qe;
sched_local.order =
sched_local.buf_hdr[0]->order;
sched_local.sync =
sched_local.buf_hdr[0]->sync;
sched_local.enq_called = 0;
- if (odp_queue_enq(pri_q, ev))
- ODP_ABORT("schedule failed\n");
} else if (queue_is_atomic(qe)) {
/* Hold queue during atomic access */
sched_local.pri_queue = pri_q;