From: Thomas Monjalon <thomas@monjalon.net>
To: dev@dpdk.org, Tyler Retzlaff <roretzla@linux.microsoft.com>
Cc: david.marchand@redhat.com
Subject: Re: [PATCH] eal: provide per lcore macros for MSVC
Date: Tue, 11 Jul 2023 08:25:47 +0200 [thread overview]
Message-ID: <5162377.8F6SAcFxjW@thomas> (raw)
In-Reply-To: <1689024585-17303-2-git-send-email-roretzla@linux.microsoft.com>
10/07/2023 23:29, Tyler Retzlaff:
> Provide per lcore macros that use __declspec(thread) and uses C23
> typeof.
>
> Signed-off-by: Tyler Retzlaff <roretzla@linux.microsoft.com>
> ---
> +#ifndef RTE_TOOLCHAIN_MSVC
> /**
> * Macro to define a per lcore variable "var" of type "type", don't
> * use keywords like "static" or "volatile" in type, just prefix the
> @@ -37,6 +38,13 @@
> */
> #define RTE_DECLARE_PER_LCORE(type, name) \
> extern __thread __typeof__(type) per_lcore_##name
> +#else
> +#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
> +#endif
It would be better (here and in other MSVC patches)
to have the opposite logic: start with MSVC implementation.
#ifdef MSVC
MSVC implementation
#else
POSIX implementation
#endif
next prev parent reply other threads:[~2023-07-11 6:25 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-07-10 21:29 [PATCH] provide Windows/MSVC lcore macros Tyler Retzlaff
2023-07-10 21:29 ` [PATCH] eal: provide per lcore macros for MSVC Tyler Retzlaff
2023-07-11 6:25 ` Thomas Monjalon [this message]
2023-07-11 15:52 ` [PATCH v2] provide Windows/MSVC lcore macros Tyler Retzlaff
2023-07-11 15:52 ` [PATCH v2] eal: provide per lcore macros for MSVC Tyler Retzlaff
2023-07-11 16:09 ` Stephen Hemminger
2023-08-25 8:49 ` David Marchand
2023-08-31 11:57 ` Thomas Monjalon
2023-08-31 23:08 ` Tyler Retzlaff
2023-09-21 9:36 ` Thomas Monjalon
2023-09-21 15:45 ` Tyler Retzlaff
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=5162377.8F6SAcFxjW@thomas \
--to=thomas@monjalon.net \
--cc=david.marchand@redhat.com \
--cc=dev@dpdk.org \
--cc=roretzla@linux.microsoft.com \
/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).