DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev]  [PATCH] eal: fix clang compilation error on ARM64
@ 2018-04-06 11:01 Pavan Nikhilesh
  2018-04-06 16:24 ` Thomas Monjalon
  2018-04-11 17:01 ` [dpdk-dev] [PATCH v2] " Pavan Nikhilesh
  0 siblings, 2 replies; 11+ messages in thread
From: Pavan Nikhilesh @ 2018-04-06 11:01 UTC (permalink / raw)
  To: jerin.jacob, ferruh.yigit, stephen, konstantin.ananyev, thomas
  Cc: dev, Pavan Nikhilesh

Use __atomic_exchange_n instead of __atomic_exchange_(2/4/8).

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

Signed-off-by: Pavan Nikhilesh <pbhagavatula@caviumnetworks.com>
---
 lib/librte_eal/common/include/generic/rte_atomic.h | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/lib/librte_eal/common/include/generic/rte_atomic.h b/lib/librte_eal/common/include/generic/rte_atomic.h
index 8652c0264..91a6d615a 100644
--- a/lib/librte_eal/common/include/generic/rte_atomic.h
+++ b/lib/librte_eal/common/include/generic/rte_atomic.h
@@ -12,7 +12,9 @@
  * This file defines a generic API for atomic operations.
  */
 
+#include <stdatomic.h>
 #include <stdint.h>
+
 #include <rte_common.h>
 
 #ifdef __DOXYGEN__
@@ -212,7 +214,7 @@ rte_atomic16_exchange(volatile uint16_t *dst, uint16_t val);
 static inline uint16_t
 rte_atomic16_exchange(volatile uint16_t *dst, uint16_t val)
 {
-	return __atomic_exchange_2(dst, val, __ATOMIC_SEQ_CST);
+	return __atomic_exchange_n(dst, val, __ATOMIC_SEQ_CST);
 }
 #endif
 
@@ -491,7 +493,7 @@ rte_atomic32_exchange(volatile uint32_t *dst, uint32_t val);
 static inline uint32_t
 rte_atomic32_exchange(volatile uint32_t *dst, uint32_t val)
 {
-	return __atomic_exchange_4(dst, val, __ATOMIC_SEQ_CST);
+	return __atomic_exchange_n(dst, val, __ATOMIC_SEQ_CST);
 }
 #endif
 
@@ -769,7 +771,7 @@ rte_atomic64_exchange(volatile uint64_t *dst, uint64_t val);
 static inline uint64_t
 rte_atomic64_exchange(volatile uint64_t *dst, uint64_t val)
 {
-	return __atomic_exchange_8(dst, val, __ATOMIC_SEQ_CST);
+	return __atomic_exchange_n(dst, val, __ATOMIC_SEQ_CST);
 }
 #endif
 
-- 
2.17.0

^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2018-04-11 21:48 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-04-06 11:01 [dpdk-dev] [PATCH] eal: fix clang compilation error on ARM64 Pavan Nikhilesh
2018-04-06 16:24 ` Thomas Monjalon
2018-04-06 18:25   ` Pavan Nikhilesh
2018-04-10 15:07     ` Thomas Monjalon
2018-04-10 21:35       ` Thomas Monjalon
2018-04-11  8:38         ` Pavan Nikhilesh
2018-04-11  8:46           ` Thomas Monjalon
2018-04-11  9:00             ` Pavan Nikhilesh
2018-04-11 17:01 ` [dpdk-dev] [PATCH v2] " Pavan Nikhilesh
2018-04-11 20:42   ` Thomas Monjalon
2018-04-11 21:48     ` Stephen Hemminger

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).