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 0DD0542E47; Tue, 11 Jul 2023 17:52:32 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id DBD2C40A7D; Tue, 11 Jul 2023 17:52:31 +0200 (CEST) Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by mails.dpdk.org (Postfix) with ESMTP id B198A4003C for ; Tue, 11 Jul 2023 17:52:29 +0200 (CEST) Received: by linux.microsoft.com (Postfix, from userid 1086) id E893A21C426B; Tue, 11 Jul 2023 08:52:28 -0700 (PDT) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com E893A21C426B DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1689090748; bh=0FYiic5EVXqY/tr1blKRTgMLJO5R7EbRoHU4gFx350w=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=eu/0cB/ZRHk1IS/a5WXM1eyn/b34hTzQjUwFOiZjD0cTSy0EFv4ydN7nTk6GTYXHG SBccXdjS0vQ4dh8N5a4ZnW/iXulfiHXEg/KE6vXiZGpIFjfWfoVuLKLymTBSBGxabJ 6wAVpnqpUCgEzHzNAqNSqzLkPoH+s1yTmwT1Opdg= From: Tyler Retzlaff To: dev@dpdk.org Cc: david.marchand@redhat.com, thomas@monjalon.net, Tyler Retzlaff Subject: [PATCH v2] provide Windows/MSVC lcore macros Date: Tue, 11 Jul 2023 08:52:26 -0700 Message-Id: <1689090747-5331-1-git-send-email-roretzla@linux.microsoft.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1689024585-17303-1-git-send-email-roretzla@linux.microsoft.com> References: <1689024585-17303-1-git-send-email-roretzla@linux.microsoft.com> 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 Provide MSVC compatible macros RTE_DEFINE_PER_LCORE and RTE_DECLARE_PER_LCORE that expand appropriately for Windows/MSVC NOTICE: It is intentional that devtools/checkpatches.pl generates an error about parenthesis to allow comparison with clang/gcc versions of these macros which also do not have the parenthesis. ``` ERROR:COMPLEX_MACRO: Macros with complex values should be enclosed in parenthesis #31: FILE: lib/eal/include/rte_per_lcore.h:42: +#define RTE_DEFINE_PER_LCORE(type, name) \ + __declspec(thread) typeof(type) per_lcore_##name ERROR:COMPLEX_MACRO: Macros with complex values should be enclosed in parenthesis #34: FILE: lib/eal/include/rte_per_lcore.h:45: +#define RTE_DECLARE_PER_LCORE(type, name) \ + extern __declspec(thread) typeof(type) per_lcore_##name ``` v2: * invert macro test for msvc #ifndef -> #ifdef Tyler Retzlaff (1): eal: provide per lcore macros for MSVC lib/eal/include/rte_per_lcore.h | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) -- 1.8.3.1