service: relax barriers with C11 atomics
authorPhil Yang <phil.yang@arm.com>
Wed, 6 May 2020 15:28:04 +0000 (23:28 +0800)
committerDavid Marchand <david.marchand@redhat.com>
Mon, 11 May 2020 11:21:54 +0000 (13:21 +0200)
commit205032bbfcf09a1fd9bea715eafb5c97ca73772c
tree59223119d5ac8771e0eebbf5d6a6fdaca5d5ac4e
parent41e8227e207c5db2ab3fd0ceaa88de751d811749
service: relax barriers with C11 atomics

The runstate, comp_runstate and app_runstate are used as guard variables
in the service core lib. To guarantee the inter-threads visibility of
these guard variables, it uses rte_smp_r/wmb. This patch use c11 atomic
built-ins to relax these barriers.

Signed-off-by: Phil Yang <phil.yang@arm.com>
Reviewed-by: Honnappa Nagarahalli <honnappa.nagarahalli@arm.com>
Acked-by: Harry van Haaren <harry.van.haaren@intel.com>
lib/librte_eal/common/rte_service.c