git.droids-corp.org
/
dpdk.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
875f350
)
pflock: use wait until scheme for read lock
author
Feifei Wang
<feifei.wang2@arm.com>
Mon, 1 Nov 2021 06:00:04 +0000
(14:00 +0800)
committer
David Marchand
<david.marchand@redhat.com>
Wed, 3 Nov 2021 14:50:14 +0000
(15:50 +0100)
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>
lib/eal/include/generic/rte_pflock.h
patch
|
blob
|
history
diff --git
a/lib/eal/include/generic/rte_pflock.h
b/lib/eal/include/generic/rte_pflock.h
index
e57c179
..
b9de063
100644
(file)
--- a/
lib/eal/include/generic/rte_pflock.h
+++ b/
lib/eal/include/generic/rte_pflock.h
@@
-121,9
+121,8
@@
rte_pflock_read_lock(rte_pflock_t *pf)
return;
/* Wait for current write phase to complete. */
- while ((__atomic_load_n(&pf->rd.in, __ATOMIC_ACQUIRE)
- & RTE_PFLOCK_WBITS) == w)
- rte_pause();
+ RTE_WAIT_UNTIL_MASKED(&pf->rd.in, RTE_PFLOCK_WBITS, !=, w,
+ __ATOMIC_ACQUIRE);
}
/**