eal: define container_of macro
authorJan Blunck <jblunck@infradead.org>
Fri, 23 Dec 2016 15:57:52 +0000 (16:57 +0100)
committerThomas Monjalon <thomas.monjalon@6wind.com>
Sat, 24 Dec 2016 17:45:01 +0000 (18:45 +0100)
commit9b815f2141deba07bbfe0b275bb4665c6a275097
tree030217dd7827da96a104b1a6e6fc54319df633db
parent47a20b73e21edac7320bf88f5912d24b5c48b2ef
eal: define container_of macro

This macro is based on Jan Viktorin's original patch but also checks the
type of the passed pointer against the type of the member.

Signed-off-by: Jan Viktorin <viktorin@rehivetech.com>
Signed-off-by: Shreyansh Jain <shreyansh.jain@nxp.com>
[jblunck@infradead.org: add type checking and __extension__]
Signed-off-by: Jan Blunck <jblunck@infradead.org>
lib/librte_eal/common/include/rte_common.h