service: fix and refactor atomic service accesses
authorHarry van Haaren <harry.van.haaren@intel.com>
Mon, 21 Aug 2017 12:58:09 +0000 (13:58 +0100)
committerThomas Monjalon <thomas@monjalon.net>
Fri, 15 Sep 2017 11:46:24 +0000 (13:46 +0200)
commit3cf5eb1546ed83ee1b5c3fe8ca9d5274ffe4bd59
tree5b97d382a199076610eea76b5efd3353cc8bc818
parent8edc9aaaf217e809ff391dce5893b186688f7973
service: fix and refactor atomic service accesses

This commit fixes an issue in the service runner function,
where the atomic value was not cleared on exiting the service
function. This resulted in future attempts to run the service
to appear like the function was running, however it was in
reality deadlocked.

This commit refactors the atomic handling to be more readable,
by splitting the implementation code into a new static inline
function. The remaining flow control of atomics in the existing
function is refactored for readability.

Fixes: 21698354c832 ("service: introduce service cores concept")

Signed-off-by: Harry van Haaren <harry.van.haaren@intel.com>
Acked-by: Pavan Nikhilesh <pbhagavatula@caviumnetworks.com>
doc/guides/rel_notes/release_17_11.rst
lib/librte_eal/common/rte_service.c