From patchwork Thu Sep 21 18:13:45 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tyler Retzlaff X-Patchwork-Id: 131806 X-Patchwork-Delegate: david.marchand@redhat.com Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 2E9CA4260D; Thu, 21 Sep 2023 20:13:50 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id B36B94013F; Thu, 21 Sep 2023 20:13:49 +0200 (CEST) Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by mails.dpdk.org (Postfix) with ESMTP id 74FD6400D7 for ; Thu, 21 Sep 2023 20:13:48 +0200 (CEST) Received: by linux.microsoft.com (Postfix, from userid 1086) id 26602212BBB0; Thu, 21 Sep 2023 11:13:47 -0700 (PDT) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com 26602212BBB0 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1695320027; bh=a0thexk3a3fGhk6aMa6Gayk+g0cI7DMJuyHzO89AALY=; h=From:To:Cc:Subject:Date:From; b=kpJ1GmX2l83iYd9lOERiZdZMZ3l/jXIqKLyiiztEXXhY+JxBKdzgAN9uRITejL/2Y HGoYAt9R9d/01mXYAzhzIU+oc2f1eJ3wFqx9yJNo8qo/5gbuqBdUNinUvLe4Oik14x GNEmCv7qy9N/7C5bT6sBCngl7xu7qkIvCZWZckaI= From: Tyler Retzlaff To: dev@dpdk.org Cc: Thomas Monjalon , Tyler Retzlaff Subject: [PATCH] eal: fix location of per lcore macro documentation Date: Thu, 21 Sep 2023 11:13:45 -0700 Message-Id: <1695320025-3961-1-git-send-email-roretzla@linux.microsoft.com> X-Mailer: git-send-email 1.8.3.1 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 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 Reviewed-by: David Marchand --- 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 #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