eal: add wrapper for C11 atomic thread fence
[dpdk.git] / lib / librte_eal / ppc / include / rte_atomic.h
index 7e3e131..527fcaf 100644 (file)
@@ -40,6 +40,12 @@ extern "C" {
 
 #define rte_cio_rmb() rte_rmb()
 
+static __rte_always_inline void
+rte_atomic_thread_fence(int memory_order)
+{
+       __atomic_thread_fence(memory_order);
+}
+
 /*------------------------- 16 bit atomic operations -------------------------*/
 /* To be compatible with Power7, use GCC built-in functions for 16 bit
  * operations */