X-Git-Url: http://git.droids-corp.org/?a=blobdiff_plain;ds=sidebyside;f=lib%2Flibrte_eal%2Fcommon%2Finclude%2Frte_per_lcore.h;h=5434729aca926b2df6137c7023cf4c9733f6643b;hb=6d7de6d2e357aa6323e42861e434c4f17d42becf;hp=14d35214f3d7221c8e1e17f868b722ade5650c64;hpb=3031749c2df04a63cdcef186dcce3781e61436e8;p=dpdk.git diff --git a/lib/librte_eal/common/include/rte_per_lcore.h b/lib/librte_eal/common/include/rte_per_lcore.h index 14d35214f3..5434729aca 100644 --- a/lib/librte_eal/common/include/rte_per_lcore.h +++ b/lib/librte_eal/common/include/rte_per_lcore.h @@ -51,26 +51,26 @@ extern "C" { #endif -#include +#include -#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 }