*/
int rte_sys_gettid(void);
+RTE_DECLARE_PER_LCORE(int, _thread_id);
+
/**
* Get system unique thread id.
*
*/
static inline int rte_gettid(void)
{
- static RTE_DEFINE_PER_LCORE(int, _thread_id) = -1;
if (RTE_PER_LCORE(_thread_id) == -1)
RTE_PER_LCORE(_thread_id) = rte_sys_gettid();
return RTE_PER_LCORE(_thread_id);