ring: separate out head index manipulation
authorBruce Richardson <bruce.richardson@intel.com>
Wed, 29 Mar 2017 15:21:28 +0000 (16:21 +0100)
committerThomas Monjalon <thomas.monjalon@6wind.com>
Wed, 29 Mar 2017 20:32:20 +0000 (22:32 +0200)
commit0dfc98c507b15bc32671fa047504e2dd7107e94c
tree9b39d2b7d77ab6a8313245f031432ca01f2ccd05
parent3fe963a85ae9c953b3cd905753d1f23af44cf30f
ring: separate out head index manipulation

We can write a single common function for head manipulation for enq
and a common one for deq, allowing us to have a single worker function
for enq and deq, rather than two of each. Update all other inline
functions to use the new functions.

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Reviewed-by: Yuanhan Liu <yuanhan.liu@linux.intel.com>
Acked-by: Olivier Matz <olivier.matz@6wind.com>
lib/librte_ring/rte_ring.c
lib/librte_ring/rte_ring.h