X-Git-Url: http://git.droids-corp.org/?a=blobdiff_plain;f=app%2Ftest%2Ftest_barrier.c;h=c27f8a0742f2f682d64a965a1ccbf79cac3fe4f9;hb=f0243339496d48e6f5d76e6ef6741d6986b965d0;hp=a0b47042f86d005470b5e407ea5b629305a90710;hpb=f8f207c00f03882295abad82d6e4e603f2b19085;p=dpdk.git diff --git a/app/test/test_barrier.c b/app/test/test_barrier.c index a0b47042f8..c27f8a0742 100644 --- a/app/test/test_barrier.c +++ b/app/test/test_barrier.c @@ -92,12 +92,14 @@ plock_lock(struct plock *l, uint32_t self) other = self ^ 1; l->flag[self] = 1; + rte_smp_wmb(); l->victim = self; store_load_barrier(l->utype); while (l->flag[other] == 1 && l->victim == self) rte_pause(); + rte_smp_rmb(); } static void @@ -234,7 +236,7 @@ plock_test(uint64_t iter, enum plock_use_type utype) /* test phase - start and wait for completion on each active lcore */ - rte_eal_mp_remote_launch(plock_test1_lcore, lpt, CALL_MASTER); + rte_eal_mp_remote_launch(plock_test1_lcore, lpt, CALL_MAIN); rte_eal_mp_wait_lcore(); /* validation phase - make sure that shared and local data match */