[PATCH 4/5] ring: use rte atomic thread fence

Tyler Retzlaff roretzla at linux.microsoft.com
Thu Nov 2 04:04:24 CET 2023


Use __rte_atomic_thread_fence instead of directly using
__atomic_thread_fence builtin gcc intrinsic

Signed-off-by: Tyler Retzlaff <roretzla at linux.microsoft.com>
---
 lib/ring/rte_ring_c11_pvt.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/lib/ring/rte_ring_c11_pvt.h b/lib/ring/rte_ring_c11_pvt.h
index 5c10ad8..38a003d 100644
--- a/lib/ring/rte_ring_c11_pvt.h
+++ b/lib/ring/rte_ring_c11_pvt.h
@@ -68,7 +68,7 @@
 		n = max;
 
 		/* Ensure the head is read before tail */
-		__atomic_thread_fence(rte_memory_order_acquire);
+		__rte_atomic_thread_fence(rte_memory_order_acquire);
 
 		/* load-acquire synchronize with store-release of ht->tail
 		 * in update_tail.
@@ -145,7 +145,7 @@
 		n = max;
 
 		/* Ensure the head is read before tail */
-		__atomic_thread_fence(rte_memory_order_acquire);
+		__rte_atomic_thread_fence(rte_memory_order_acquire);
 
 		/* this load-acquire synchronize with store-release of ht->tail
 		 * in update_tail.
-- 
1.8.3.1



More information about the dev mailing list