]> git.droids-corp.org - dpdk.git/blobdiff - lib/eal/common/eal_common_launch.c
ipc: end multiprocess thread during cleanup
[dpdk.git] / lib / eal / common / eal_common_launch.c
index 78fd9402677151413df5b69c6709214d70d8a1d9..e95dadffb343e289323f60a38fe95549a4786c03 100644 (file)
 int
 rte_eal_wait_lcore(unsigned worker_id)
 {
-       if (lcore_config[worker_id].state == WAIT)
-               return 0;
-
-       while (lcore_config[worker_id].state != WAIT)
+       while (__atomic_load_n(&lcore_config[worker_id].state,
+                                       __ATOMIC_ACQUIRE) != WAIT)
                rte_pause();
 
-       rte_rmb();
-
        return lcore_config[worker_id].ret;
 }