mcslock: use WFE in lock for aarch64

Instead of polling for previous lock holder unlocking, use
wait_until_equal API.

Signed-off-by: Feifei Wang <feifei.wang2@arm.com>
Reviewed-by: Ruifeng Wang <ruifeng.wang@arm.com>
This commit is contained in:
Feifei Wang 2021-10-20 11:03:35 +08:00 committed by David Marchand
parent a6e24bf417
commit c4629b02c5

View File

@ -84,8 +84,7 @@ rte_mcslock_lock(rte_mcslock_t **msl, rte_mcslock_t *me)
* to spin on me->locked until the previous lock holder resets
* the me->locked using mcslock_unlock().
*/
while (__atomic_load_n(&me->locked, __ATOMIC_ACQUIRE))
rte_pause();
rte_wait_until_equal_32((uint32_t *)&me->locked, 0, __ATOMIC_ACQUIRE);
}
/**