eal: fix location of per lcore macro documentation

Message ID 1695320025-3961-1-git-send-email-roretzla@linux.microsoft.com (mailing list archive)
State Accepted, archived
Delegated to: David Marchand
Headers
Series eal: fix location of per lcore macro documentation |

Checks

Context Check Description
ci/checkpatch warning coding style issues
ci/loongarch-compilation success Compilation OK
ci/loongarch-unit-testing success Unit Testing PASS
ci/Intel-compilation success Compilation OK
ci/intel-Testing success Testing PASS
ci/github-robot: build success github build: passed
ci/intel-Functional success Functional PASS
ci/iol-intel-Performance success Performance Testing PASS
ci/iol-compile-amd64-testing success Testing PASS
ci/iol-unit-amd64-testing success Testing PASS
ci/iol-compile-arm64-testing success Testing PASS
ci/iol-unit-arm64-testing success Testing PASS
ci/iol-mellanox-Performance success Performance Testing PASS
ci/iol-sample-apps-testing success Testing PASS
ci/iol-intel-Functional success Functional Testing PASS
ci/iol-broadcom-Performance success Performance Testing PASS
ci/iol-broadcom-Functional success Functional Testing PASS

Commit Message

Tyler Retzlaff Sept. 21, 2023, 6:13 p.m. UTC
  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")
Cc: roretzla@linux.microsoft.com

Signed-off-by: Tyler Retzlaff <roretzla@linux.microsoft.com>
---
 lib/eal/include/rte_per_lcore.h | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)
  

Comments

David Marchand Sept. 22, 2023, 2:13 p.m. UTC | #1
On Thu, Sep 21, 2023 at 8:14 PM Tyler Retzlaff
<roretzla@linux.microsoft.com> wrote:
>
> 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")
>
> Signed-off-by: Tyler Retzlaff <roretzla@linux.microsoft.com>

Reviewed-by: David Marchand <david.marchand@redhat.com>

Applied, thanks Tyler.
  

Patch

diff --git a/lib/eal/include/rte_per_lcore.h b/lib/eal/include/rte_per_lcore.h
index 2b846f9..0bfc2ff 100644
--- a/lib/eal/include/rte_per_lcore.h
+++ b/lib/eal/include/rte_per_lcore.h
@@ -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