eal: introduce atomic exchange operation
authorStephen Hemminger <stephen@networkplumber.org>
Fri, 26 Jan 2018 02:01:37 +0000 (18:01 -0800)
committerFerruh Yigit <ferruh.yigit@intel.com>
Fri, 30 Mar 2018 12:08:43 +0000 (14:08 +0200)
commitff2863570fccaa9f31db3c91d0f40a5532a198c7
treedac7c61bb5c4ad14f1594a3f6c16cb4ac15c9a82
parentadeb2a2d572bdadb44466b874556682f480681dc
eal: introduce atomic exchange operation

To handle atomic update of link status (64 bit), every driver
was doing its own version using cmpset.
Atomic exchange is a useful primitive in its own right;
therefore make it a EAL routine.

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
lib/librte_eal/common/include/arch/ppc_64/rte_atomic.h
lib/librte_eal/common/include/arch/x86/rte_atomic.h
lib/librte_eal/common/include/arch/x86/rte_atomic_32.h
lib/librte_eal/common/include/arch/x86/rte_atomic_64.h
lib/librte_eal/common/include/generic/rte_atomic.h