Sorry, But I cannot find any relationships between ‘queue->s.sync_in[i]’ and ‘odp_schedule_order_lock’ in the ODP-1.6.0.0 vesion. Would you give me some more details to help me understand that ? Thanks.
发件人: Bill Fischofer [mailto:bill.fischo...@linaro.org] 发送时间: 2016年1月16日 8:51 收件人: Xu Zaibo 抄送: Tangchaofei; Liuzhongzhu; chenlizhi; yangfajun; Huwei (Xavier); Cuiaiguo (Aiguo Cui, WN); lng-odp@lists.linaro.org 主题: Re: [lng-odp] [PATCH] queue: queue_deq: delete atomic fetch and inc This patch is incorrect. The atomics are needed since odp_schedule_order_lock() does not lock the queue. On Thursday, January 14, 2016, Zaibo Xu <xuza...@huawei.com<mailto:xuza...@huawei.com>> wrote: As all the queue_deq is locked by queue lock, I think it doesn't need to atomic opertion here any more. Signed-off-by: Zaibo Xu <xuza...@huawei.com<javascript:;>> --- platform/linux-generic/odp_queue.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/platform/linux-generic/odp_queue.c b/platform/linux-generic/odp_queue.c index e39176c..48b0831 100644 --- a/platform/linux-generic/odp_queue.c +++ b/platform/linux-generic/odp_queue.c @@ -662,8 +662,7 @@ odp_buffer_hdr_t *queue_deq(queue_entry_t *queue) buf_hdr->origin_qe = queue; buf_hdr->order = queue->s.order_in++; for (i = 0; i < queue->s.param.sched.lock_count; i++) { - buf_hdr->sync[i] = - odp_atomic_fetch_inc_u64(&queue->s.sync_in[i]); + buf_hdr->sync[i] = queue->s.sync_in[i]++; } buf_hdr->flags.sustain = SUSTAIN_ORDER; } else { -- 1.9.1 _______________________________________________ lng-odp mailing list lng-odp@lists.linaro.org<javascript:;> https://lists.linaro.org/mailman/listinfo/lng-odp
_______________________________________________ lng-odp mailing list lng-odp@lists.linaro.org https://lists.linaro.org/mailman/listinfo/lng-odp