From: Tyler Retzlaff <roretzla@linux.microsoft.com>
To: dev@dpdk.org
Cc: Thomas Monjalon <thomas@monjalon.net>,
Tyler Retzlaff <roretzla@linux.microsoft.com>
Subject: [PATCH] eal: fix location of per lcore macro documentation
Date: Thu, 21 Sep 2023 11:13:45 -0700 [thread overview]
Message-ID: <1695320025-3961-1-git-send-email-roretzla@linux.microsoft.com> (raw)
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(-)
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
--
1.8.3.1
next reply other threads:[~2023-09-21 18:13 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-09-21 18:13 Tyler Retzlaff [this message]
2023-09-22 14:13 ` David Marchand
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1695320025-3961-1-git-send-email-roretzla@linux.microsoft.com \
--to=roretzla@linux.microsoft.com \
--cc=dev@dpdk.org \
--cc=thomas@monjalon.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).