lib/rcu: use rte atomic thread fence wrapper instead
PATCH 1/1 lib/rcu: use rte atomic thread fence wrapper instead
Use rte_atomic_thread_fence wrapper which has been provided for __atomic_thread_fence builtins to support optimized code for __ATOMIC_SEQ_CST memory order on x86 platforms.
Signed-off-by Joyce Kong <[email protected]>
Reviewed-by Honnappa Nagarahalli <[email protected]>
--- lib/librte_rcu/rte_rcu_qsbr.h | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-)
lib/librte_rcu/rte_rcu_qsbr.h +1 -6
@@ -329,12 +329,7 @@ rte_rcu_qsbr_thread_online(struct rte_rcu_qsbr *v, unsigned int thread_id)* writer might not see that the reader is online, even though * the reader is referencing the shared data structure. */ -#ifdef RTE_ARCH_X86_64 -/* rte_smp_mb() for x86 is lighter */ -rte_smp_mb (); -#else -__atomic_thread_fence (__ATOMIC_SEQ_CST); -#endif +rte_atomic_thread_fence (__ATOMIC_SEQ_CST); }/**
Signature · 1 line
2.29.2
David Marchand
AppliedQuoted 7 lines · Joyce Kong
Use
rte_atomic_thread_fencewrapper which has been provided for__atomic_thread_fencebuiltins to support optimized code for__ATOMIC_SEQ_CSTmemory order on x86 platforms.Signed-off-by Joyce Kong <[email protected]>Reviewed-by Honnappa Nagarahalli <[email protected]>
Applied, thanks.
Signature · 1 line
David Marchand