stack: fix inconsistent weak/strong CAS
authorSteven Lariau <steven.lariau@arm.com>
Fri, 25 Sep 2020 17:43:35 +0000 (18:43 +0100)
committerDavid Marchand <david.marchand@redhat.com>
Wed, 30 Sep 2020 19:08:39 +0000 (21:08 +0200)
commit0df8e2d2c9ac4d38c6d4c27c0e865c1695e5348d
tree1577caac6433e7d203becc49ced36a998966adc3
parentc51e67c2ee18305913c67cae3c9c3e54860acd86
stack: fix inconsistent weak/strong CAS

Fix cmpexchange usage of weak / strong.
The generated code is the same on x86 and ARM (there is no weak
cmpexchange), but the old usage was inconsistent.
For push and pop update size, weak is used because cmpexchange is inside
a loop.
For pop update root, strong is used even though cmpexchange is inside a
loop, because there may be a lot of operations to do in a loop iteration
(locate the new head).

Signed-off-by: Steven Lariau <steven.lariau@arm.com>
Reviewed-by: Dharmik Thakkar <dharmik.thakkar@arm.com>
Reviewed-by: Ruifeng Wang <ruifeng.wang@arm.com>
Acked-by: Gage Eads <gage.eads@intel.com>
lib/librte_stack/rte_stack_lf_c11.h