I am sorry. I should've posted to the user list of couse.
2018-02-13 22:37 GMT+03:00 Alex Kiselev <kisele...@gmail.com>:
> I've been wondering should I use a release/acquire memory barrier pair
> in order to be sure that the other thread will see the fully/corrected
> initialized object
> passed to it via a dpdk ring or ring itself is a kind of barrier?
> Let's say I have a pseudo code:
> obj = alloc();
> obj initialization
> ??? fence(memory_order_release); ???
> rte_ring_sp_enqueue(ring, obj)
> ??? fence(memory_order_acquire); ???
> rte_ring_sc_dequeue(ring, obj)
> Should I use fences in that code?