pflock: use wait until scheme for read lock
Instead of polling for read pflock update, use wait until scheme for this case. Signed-off-by: Feifei Wang <feifei.wang2@arm.com> Reviewed-by: Ruifeng Wang <ruifeng.wang@arm.com> Acked-by: Jerin Jacob <jerinj@marvell.com>
This commit is contained in:
parent
875f350924
commit
41902d2468
@ -121,9 +121,8 @@ rte_pflock_read_lock(rte_pflock_t *pf)
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
/* Wait for current write phase to complete. */
|
/* Wait for current write phase to complete. */
|
||||||
while ((__atomic_load_n(&pf->rd.in, __ATOMIC_ACQUIRE)
|
RTE_WAIT_UNTIL_MASKED(&pf->rd.in, RTE_PFLOCK_WBITS, !=, w,
|
||||||
& RTE_PFLOCK_WBITS) == w)
|
__ATOMIC_ACQUIRE);
|
||||||
rte_pause();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
x
Reference in New Issue
Block a user