Skip to contentSkip to conversation

eal: fix msvc conditional compile of rte atomic thread fence

PATCH Applied Tyler Retzlaff 3 participants 3 messages Nov 7, 2023 – Nov 8, 2023

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 eal: fix msvc conditional compile of rte atomic thread fence

MSVC does not expose legacy atomics. When the legacy atomics were excluded rte_atomic_thread_fence was also unintentionally excluded

Adjust the conditional compilation check to expose rte_atomic_thread_fence.

Fixes 27da6a123414 ("eal: hide legacy atomics API for MSVC")
---
 lib/eal/x86/include/rte_atomic.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
lib/eal/x86/include/rte_atomic.h +2 -2
index f754423..74b1b24 100644
@@ -83,8 +83,6 @@
 
 #define rte_io_rmb() rte_compiler_barrier()
 
-#ifndef RTE_TOOLCHAIN_MSVC
-
 /**
  * Synchronization fence between threads based on the specified memory order.
  *
@@ -101,6 +99,8 @@
 		__rte_atomic_thread_fence(memorder);
 }
 
+#ifndef RTE_TOOLCHAIN_MSVC
+
 /*------------------------- 16 bit atomic operations -------------------------*/
 
 #ifndef RTE_FORCE_INTRINSICS
Signature · 1 line
1.8.3.1
Acked-by on v1 1/1
#1 lore raw
Quoted 6 lines

From: Tyler Retzlaff [mailto:[email protected]]
Sent: Tuesday, 7 November 2023 21.00

MSVC does not expose legacy atomics. When the legacy atomics were excluded rte_atomic_thread_fence was also unintentionally excluded

Quoted 7 lines

Adjust the conditional compilation check to expose rte_atomic_thread_fence.

Fixes 27da6a123414 ("eal: hide legacy atomics API for MSVC")

---

#2 lore raw

08/11/2023 09:27, Morten Brørup:

Quoted 6 lines
Quoted 6 lines

From: Tyler Retzlaff [mailto:[email protected]]
Sent: Tuesday, 7 November 2023 21.00

MSVC does not expose legacy atomics. When the legacy atomics were excluded rte_atomic_thread_fence was also unintentionally excluded

Quoted 8 lines
Quoted 6 lines

Adjust the conditional compilation check to expose rte_atomic_thread_fence.

Fixes 27da6a123414 ("eal: hide legacy atomics API for MSVC")

Applied, thanks.