eal/x86: fix atomic exchange for 32-bit
authorKonstantin Ananyev <konstantin.ananyev@intel.com>
Wed, 2 May 2018 13:58:26 +0000 (14:58 +0100)
committerThomas Monjalon <thomas@monjalon.net>
Wed, 2 May 2018 17:23:06 +0000 (19:23 +0200)
commit51c7de38e2b1ee16eb6ce0aa257048a4f4d8275e
tree949e1163652aad1d0bfa2701c8418d01c07149fa
parent0db6d2782cfabb8ceb10052897e30ac084010894
eal/x86: fix atomic exchange for 32-bit

Should break out of loop when rte_atomic64_cmpset() returns non-zero.

Fixes: ff2863570fcc ("eal: introduce atomic exchange operation")

Signed-off-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
Tested-by: Ferruh Yigit <ferruh.yigit@intel.com>
lib/librte_eal/common/include/arch/x86/rte_atomic_32.h