Skip to contentSkip to conversation

eal: fix location of per lcore macro documentation

PATCH Applied Tyler Retzlaff 2 participants 2 messages Sep 21, 2023 – Sep 22, 2023

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 eal: fix location of per lcore macro documentation

doxygen document generation does traverse RTE_TOOLCHAIN_MSVC conditional compilation paths so move the documentation for per lcore macros out of the RTE_TOOLCHAIN_MSVC block.

Fixes b2f967dcae69 ("eal: implement per lcore variables for MSVC")
---
 lib/eal/include/rte_per_lcore.h | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)
lib/eal/include/rte_per_lcore.h +7 -7
index 2b846f9..0bfc2ff 100644
@@ -25,24 +25,24 @@
 #include <pthread.h>
 
 #ifdef RTE_TOOLCHAIN_MSVC
+#define RTE_DEFINE_PER_LCORE(type, name)			\
+	__declspec(thread) typeof(type) per_lcore_##name
+
+#define RTE_DECLARE_PER_LCORE(type, name)			\
+	extern __declspec(thread) typeof(type) per_lcore_##name
+#else
 /**
  * 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)			\
-	__declspec(thread) typeof(type) per_lcore_##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)			\
-	extern __declspec(thread) typeof(type) per_lcore_##name
-#else
-#define RTE_DEFINE_PER_LCORE(type, name)			\
-	__thread __typeof__(type) per_lcore_##name
-
-#define RTE_DECLARE_PER_LCORE(type, name)			\
 	extern __thread __typeof__(type) per_lcore_##name
 #endif
 
Signature · 1 line
1.8.3.1
Reviewed-by on v1 1/1 Applied
#1 lore raw
Quoted 8 lines · Tyler Retzlaff

doxygen document generation does traverse RTE_TOOLCHAIN_MSVC conditional compilation paths so move the documentation for per lcore macros out of the RTE_TOOLCHAIN_MSVC block.

Fixes b2f967dcae69 ("eal: implement per lcore variables for MSVC")

Applied, thanks Tyler.

Signature · 1 line
David Marchand