From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 64B0E42E42; Tue, 11 Jul 2023 08:25:52 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id E430540A7D; Tue, 11 Jul 2023 08:25:51 +0200 (CEST) Received: from out2-smtp.messagingengine.com (out2-smtp.messagingengine.com [66.111.4.26]) by mails.dpdk.org (Postfix) with ESMTP id 7A7FF4003C for ; Tue, 11 Jul 2023 08:25:50 +0200 (CEST) Received: from compute6.internal (compute6.nyi.internal [10.202.2.47]) by mailout.nyi.internal (Postfix) with ESMTP id 2764D5C0040; Tue, 11 Jul 2023 02:25:50 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute6.internal (MEProxy); Tue, 11 Jul 2023 02:25:50 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=monjalon.net; h= cc:cc:content-transfer-encoding:content-type:content-type:date :date:from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:sender:subject:subject:to:to; s=fm2; t= 1689056750; x=1689143150; bh=MfjjjKIVGkT2+i0Tf2iVvY6mnW6lhgHz/yL 7za6vngM=; b=YV5r1LeS2MMXqKVQ8ybg/RqwRhAXoitLf11aimWqSiNpVVwnYEH mbAGYnCnkUKlLiIHqbzwbZ6Pf/9WSbffXtFEcoZosQ+gg3niAuTHBiwPUslg3z+k zhgbpx2AOTLc+cnT71I2yGqaCZBXmwj8g+zr5qx02nE4r4zYQqqo4dThLL4tjxxc KOljzLa8zwGK1eYMkP3dkAXpTzUM/MCbErLMmzhN/zxxvXQesp6cW8mHCJ3ErGaV 3fuMKXi4i3G2tdyHVdxaKFUeigpaOf9nCbev3QQbzJxCoXbx+oubr315B4NsLvro V/0kKNcmdx2gxy9JmTR69zEeqSgiaxcG1uw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:content-type:date:date:feedback-id:feedback-id :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:sender:subject:subject:to:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm2; t= 1689056750; x=1689143150; bh=MfjjjKIVGkT2+i0Tf2iVvY6mnW6lhgHz/yL 7za6vngM=; b=HXl9rwyyAc37bpl1H4puR1c3vb6HLlBOIrepZLkaQUiAeh9ARRb QFTvHveNTWyjFcgv204Gr8GU+QM2lTMfvuVQTiawE03VymuSLp7kuQr9PiRW1XzD b8yqf0y4nuvBqp2EvtRAZQIdg3KQLTvMGo0wAyJJuHF6qF7fNSM6GJXUr8BpjwoA y0TqEME3Q3zLZAbiq2sLdJ+86hn2bCIVt93GkvFE0xfa9gktFkc3So3Snn54Eoh3 B/cooFMfMrfw9Oz6qFIEMDYczcSKP7C+YknbiiuSNxgyFLtbqr8hDSoiZBKYmALU EvQiwaYf3TEC2f30KENrOw1kwVyCUTYmOqQ== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedviedrvdelgddutdelucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucenucfjughrpefhvfevufffkfgjfhgggfgtsehtuf ertddttddvnecuhfhrohhmpefvhhhomhgrshcuofhonhhjrghlohhnuceothhhohhmrghs sehmohhnjhgrlhhonhdrnhgvtheqnecuggftrfgrthhtvghrnheptdejieeifeehtdffgf dvleetueeffeehueejgfeuteeftddtieekgfekudehtdfgnecuvehluhhsthgvrhfuihii vgeptdenucfrrghrrghmpehmrghilhhfrhhomhepthhhohhmrghssehmohhnjhgrlhhonh drnhgvth X-ME-Proxy: Feedback-ID: i47234305:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Tue, 11 Jul 2023 02:25:49 -0400 (EDT) From: Thomas Monjalon To: dev@dpdk.org, Tyler Retzlaff Cc: david.marchand@redhat.com Subject: Re: [PATCH] eal: provide per lcore macros for MSVC Date: Tue, 11 Jul 2023 08:25:47 +0200 Message-ID: <5162377.8F6SAcFxjW@thomas> In-Reply-To: <1689024585-17303-2-git-send-email-roretzla@linux.microsoft.com> References: <1689024585-17303-1-git-send-email-roretzla@linux.microsoft.com> <1689024585-17303-2-git-send-email-roretzla@linux.microsoft.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org 10/07/2023 23:29, Tyler Retzlaff: > Provide per lcore macros that use __declspec(thread) and uses C23 > typeof. > > Signed-off-by: Tyler Retzlaff > --- > +#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