eal: add tailq safe iterator macro
authorPablo de Lara <pablo.de.lara.guarch@intel.com>
Fri, 22 Jul 2016 14:02:01 +0000 (15:02 +0100)
committerThomas Monjalon <thomas.monjalon@6wind.com>
Fri, 22 Jul 2016 15:38:59 +0000 (17:38 +0200)
commit954d6cf5741e2a3efb7f97852833a1ee0a1f165a
tree7d97cf0968f4963311611a1874f2d5720649a2c3
parentfe7b933b7ae0eccad4cae5937da30356fcc087d2
eal: add tailq safe iterator macro

Removing/freeing elements elements within a TAILQ_FOREACH loop is not safe.
FreeBSD defines TAILQ_FOREACH_SAFE macro, which permits
these operations safely.
This patch defines this macro for Linux systems, where it is not defined.

Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
lib/librte_eal/common/include/rte_tailq.h