numam-dpdk/lib/librte_ring
Bruce Richardson a6619414e0 ring: make struct and macros type agnostic
Modify the enqueue and dequeue macros to support copying any type of
object by passing in the exact object type. Rather than using the "ring"
structure member of rte_ring, which is of type "array of void *", instead
have the macros take the start of the ring a a pointer value, thereby
leaving the rte_ring structure as purely a header value. This allows it
to be reused by other future ring types which can add on extra fields if
they want, or even to have the actual ring elements, of whatever type
stored separate from the ring header.

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>
2017-03-29 22:32:20 +02:00
..
Makefile mk: optimize directory dependencies 2017-03-27 23:28:43 +02:00
rte_ring_version.map ring: support freeing 2015-11-04 00:49:59 +01:00
rte_ring.c ring: separate out head index manipulation 2017-03-29 22:32:20 +02:00
rte_ring.h ring: make struct and macros type agnostic 2017-03-29 22:32:20 +02:00