extern "C" {
#endif
-#include <exec-env/rte_per_lcore.h>
+#include <pthread.h>
-#ifdef __DOXYGEN__
/**
* Macro to define a per lcore variable "var" of type "type", don't
* use keywords like "static" or "volatile" in type, just prefix the
* whole macro.
*/
-#define RTE_DEFINE_PER_LCORE(type, name)
+#define RTE_DEFINE_PER_LCORE(type, name) \
+ __thread __typeof__(type) per_lcore_##name
/**
* Macro to declare an extern per lcore variable "var" of type "type"
*/
-#define RTE_DECLARE_PER_LCORE(type, name)
+#define RTE_DECLARE_PER_LCORE(type, name) \
+ extern __thread __typeof__(type) per_lcore_##name
/**
* Read/write the per-lcore variable value
*/
-#define RTE_PER_LCORE(name)
-#endif
+#define RTE_PER_LCORE(name) (per_lcore_##name)
#ifdef __cplusplus
}