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 A7EBB43C62; Wed, 6 Mar 2024 23:14:55 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 8F1F442EBF; Wed, 6 Mar 2024 23:14:53 +0100 (CET) Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by mails.dpdk.org (Postfix) with ESMTP id 583E9402C0 for ; Wed, 6 Mar 2024 23:14:49 +0100 (CET) Received: by linux.microsoft.com (Postfix, from userid 1086) id 9E23720B74C1; Wed, 6 Mar 2024 14:14:48 -0800 (PST) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com 9E23720B74C1 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1709763288; bh=hAKbgOjdKYIa1/KjHMhX3WLtW2lNQL2mcyBs/3WsV/A=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=blR2TyW1GM36tHU0k+aVnIb1V6NQLRHH+1u83i24ozJbuKqz4WLaD221jWHhUjA/5 CYkSVg5KPB+PafXhXbcYsrAoA6eepT1LTBAYARY0TSKYuS0HgWpCZOKU7jXEi8TiOg I3S1KUl4SwmzLBvjAgqPZrQl+yGkqLCifiLbEhV8= From: Tyler Retzlaff To: dev@dpdk.org Cc: Bruce Richardson , Honnappa Nagarahalli , Vladimir Medvedkin , mb@smartsharesystems.com, david.marchand@redhat.com, Tyler Retzlaff Subject: [PATCH v3 1/5] eal: add rte pure attribute macro Date: Wed, 6 Mar 2024 14:14:43 -0800 Message-Id: <1709763287-10713-2-git-send-email-roretzla@linux.microsoft.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1709763287-10713-1-git-send-email-roretzla@linux.microsoft.com> References: <1709075273-6885-1-git-send-email-roretzla@linux.microsoft.com> <1709763287-10713-1-git-send-email-roretzla@linux.microsoft.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 Add __rte_pure for __attribute__((pure)) to permit elimination of direct use of __attribute__((pure)) in other libs. Signed-off-by: Tyler Retzlaff Reviewed-by: Morten Brørup --- lib/eal/include/rte_common.h | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/lib/eal/include/rte_common.h b/lib/eal/include/rte_common.h index 298a5c6..b15a5b2 100644 --- a/lib/eal/include/rte_common.h +++ b/lib/eal/include/rte_common.h @@ -137,6 +137,15 @@ #define __rte_weak __attribute__((__weak__)) /** + * Mark a function to be pure. + */ +#ifdef RTE_TOOLCHAIN_MSVC +#define __rte_pure +#else +#define __rte_pure __attribute__((pure)) +#endif + +/** * Force symbol to be generated even if it appears to be unused. */ #ifdef RTE_TOOLCHAIN_MSVC -- 1.8.3.1