Replace the use of gcc builtin __atomic_xxx intrinsics with corresponding rte_atomic_xxx optional rte stdatomic API.
Signed-off-by: Tyler Retzlaff <roret...@linux.microsoft.com> Acked-by: Stephen Hemminger <step...@networkplumber.org> --- drivers/net/null/rte_eth_null.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/drivers/net/null/rte_eth_null.c b/drivers/net/null/rte_eth_null.c index 7c46004..f4ed3b8 100644 --- a/drivers/net/null/rte_eth_null.c +++ b/drivers/net/null/rte_eth_null.c @@ -37,8 +37,8 @@ struct null_queue { struct rte_mempool *mb_pool; struct rte_mbuf *dummy_packet; - uint64_t rx_pkts; - uint64_t tx_pkts; + RTE_ATOMIC(uint64_t) rx_pkts; + RTE_ATOMIC(uint64_t) tx_pkts; }; struct pmd_options { @@ -102,7 +102,7 @@ struct pmd_internals { } /* NOTE: review for potential ordering optimization */ - __atomic_fetch_add(&h->rx_pkts, i, __ATOMIC_SEQ_CST); + rte_atomic_fetch_add_explicit(&h->rx_pkts, i, rte_memory_order_seq_cst); return i; } @@ -130,7 +130,7 @@ struct pmd_internals { } /* NOTE: review for potential ordering optimization */ - __atomic_fetch_add(&h->rx_pkts, i, __ATOMIC_SEQ_CST); + rte_atomic_fetch_add_explicit(&h->rx_pkts, i, rte_memory_order_seq_cst); return i; } @@ -155,7 +155,7 @@ struct pmd_internals { rte_pktmbuf_free(bufs[i]); /* NOTE: review for potential ordering optimization */ - __atomic_fetch_add(&h->tx_pkts, i, __ATOMIC_SEQ_CST); + rte_atomic_fetch_add_explicit(&h->tx_pkts, i, rte_memory_order_seq_cst); return i; } @@ -178,7 +178,7 @@ struct pmd_internals { } /* NOTE: review for potential ordering optimization */ - __atomic_fetch_add(&h->tx_pkts, i, __ATOMIC_SEQ_CST); + rte_atomic_fetch_add_explicit(&h->tx_pkts, i, rte_memory_order_seq_cst); return i; } -- 1.8.3.1