[v2,3/6] hash: use rte atomic thread fence
Checks
Commit Message
Use rte_atomic_thread_fence instead of directly using
__atomic_thread_fence builtin gcc intrinsic
Signed-off-by: Tyler Retzlaff <roretzla@linux.microsoft.com>
Acked-by: Morten Brørup <mb@smartsharesystems.com>
---
lib/hash/rte_cuckoo_hash.c | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
@@ -878,7 +878,7 @@ struct rte_hash *
/* The store to sig_current should not
* move above the store to tbl_chng_cnt.
*/
- __atomic_thread_fence(rte_memory_order_release);
+ rte_atomic_thread_fence(rte_memory_order_release);
}
/* Need to swap current/alt sig to allow later
@@ -910,7 +910,7 @@ struct rte_hash *
/* The store to sig_current should not
* move above the store to tbl_chng_cnt.
*/
- __atomic_thread_fence(rte_memory_order_release);
+ rte_atomic_thread_fence(rte_memory_order_release);
}
curr_bkt->sig_current[curr_slot] = sig;
@@ -1403,7 +1403,7 @@ struct rte_hash *
/* The loads of sig_current in search_one_bucket
* should not move below the load from tbl_chng_cnt.
*/
- __atomic_thread_fence(rte_memory_order_acquire);
+ rte_atomic_thread_fence(rte_memory_order_acquire);
/* Re-read the table change counter to check if the
* table has changed during search. If yes, re-do
* the search.
@@ -1632,7 +1632,7 @@ struct rte_hash *
/* The store to sig_current should
* not move above the store to tbl_chng_cnt.
*/
- __atomic_thread_fence(rte_memory_order_release);
+ rte_atomic_thread_fence(rte_memory_order_release);
}
last_bkt->sig_current[i] = NULL_SIGNATURE;
rte_atomic_store_explicit(&last_bkt->key_idx[i],
@@ -2223,7 +2223,7 @@ struct rte_hash *
/* The loads of sig_current in compare_signatures
* should not move below the load from tbl_chng_cnt.
*/
- __atomic_thread_fence(rte_memory_order_acquire);
+ rte_atomic_thread_fence(rte_memory_order_acquire);
/* Re-read the table change counter to check if the
* table has changed during search. If yes, re-do
* the search.