X-Git-Url: http://git.droids-corp.org/?a=blobdiff_plain;f=app%2Ftest%2Ftest_ring_perf.c;h=b6ad703bb0652baee27bf80a327bf681fb2e0d2b;hb=1378ddce50eaa482891fcb7ee28c5a9248335bc6;hp=6eccccfe93b4d3a112559364b07f2eed3f792635;hpb=de307f7a7659a38a1f3469b9c73acf6d545e9007;p=dpdk.git diff --git a/app/test/test_ring_perf.c b/app/test/test_ring_perf.c index 6eccccfe93..b6ad703bb0 100644 --- a/app/test/test_ring_perf.c +++ b/app/test/test_ring_perf.c @@ -162,7 +162,11 @@ enqueue_bulk(void *p) unsigned i; void *burst[MAX_BURST] = {0}; - if ( __sync_add_and_fetch(&lcore_count, 1) != 2 ) +#ifdef RTE_USE_C11_MEM_MODEL + if (__atomic_add_fetch(&lcore_count, 1, __ATOMIC_RELAXED) != 2) +#else + if (__sync_add_and_fetch(&lcore_count, 1) != 2) +#endif while(lcore_count != 2) rte_pause(); @@ -198,7 +202,11 @@ dequeue_bulk(void *p) unsigned i; void *burst[MAX_BURST] = {0}; - if ( __sync_add_and_fetch(&lcore_count, 1) != 2 ) +#ifdef RTE_USE_C11_MEM_MODEL + if (__atomic_add_fetch(&lcore_count, 1, __ATOMIC_RELAXED) != 2) +#else + if (__sync_add_and_fetch(&lcore_count, 1) != 2) +#endif while(lcore_count != 2) rte_pause();