eal: pause while busy-waiting for lcore slave
Instead of simply busy-waiting for slave in rte_eal_wait_lcore() do rte_pause(). This will give power savings. This also fixes warning -Wempty-body seen with armv8a clang compilation. Suggested-by: Jerin Jacob <jerin.jacob@caviumnetworks.com> Signed-off-by: Ashwin Sekhar T K <ashwin.sekhar@caviumnetworks.com> Acked-by: Hemant Agrawal <hemant.agrawal@nxp.com>
This commit is contained in:
parent
47e15e618a
commit
8d55ebcc78
@ -54,7 +54,8 @@ rte_eal_wait_lcore(unsigned slave_id)
|
||||
return 0;
|
||||
|
||||
while (lcore_config[slave_id].state != WAIT &&
|
||||
lcore_config[slave_id].state != FINISHED);
|
||||
lcore_config[slave_id].state != FINISHED)
|
||||
rte_pause();
|
||||
|
||||
rte_rmb();
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user