eal: simplify control thread creation
[dpdk.git] / lib / eal / common / eal_common_launch.c
index 78fd940..e95dadf 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;
 }