DPDK patches and discussions
 help / color / mirror / Atom feed
From: Tyler Retzlaff <roretzla@linux.microsoft.com>
To: dev@dpdk.org
Cc: Bruce Richardson <bruce.richardson@intel.com>,
	Honnappa Nagarahalli <honnappa.nagarahalli@arm.com>,
	Vladimir Medvedkin <vladimir.medvedkin@intel.com>,
	mb@smartsharesystems.com,
	Tyler Retzlaff <roretzla@linux.microsoft.com>
Subject: [PATCH v2 1/3] eal: add rte pure attribute macro
Date: Wed, 28 Feb 2024 10:47:54 -0800	[thread overview]
Message-ID: <1709146076-22254-2-git-send-email-roretzla@linux.microsoft.com> (raw)
In-Reply-To: <1709146076-22254-1-git-send-email-roretzla@linux.microsoft.com>

Add __rte_pure for __attribute__((pure)) to permit elimination of
direct use of __attribute__((pure)) in other libs.

Signed-off-by: Tyler Retzlaff <roretzla@linux.microsoft.com>
Reviewed-by: Morten Brørup <mb@smartsharesystems.com>
---
 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 1cc1222..354b149 100644
--- a/lib/eal/include/rte_common.h
+++ b/lib/eal/include/rte_common.h
@@ -125,6 +125,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


  reply	other threads:[~2024-02-28 18:48 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-02-27 23:07 [PATCH 0/3] use rte macros instead of GCC __attribute Tyler Retzlaff
2024-02-27 23:07 ` [PATCH 1/3] eal: add rte pure attribute macro Tyler Retzlaff
2024-02-27 23:07 ` [PATCH 2/3] lpm: use rte macro instead of GCC attribute Tyler Retzlaff
2024-02-27 23:07 ` [PATCH 3/3] rcu: " Tyler Retzlaff
2024-02-28  9:29   ` Morten Brørup
2024-02-28 17:29     ` Tyler Retzlaff
2024-02-28 18:47 ` [PATCH v2 0/3] use rte macros instead of GCC __attribute Tyler Retzlaff
2024-02-28 18:47   ` Tyler Retzlaff [this message]
2024-02-28 18:47   ` [PATCH v2 2/3] lpm: use rte macro instead of GCC attribute Tyler Retzlaff
2024-03-06 20:51     ` Medvedkin, Vladimir
2024-02-28 18:47   ` [PATCH v2 3/3] rcu: " Tyler Retzlaff
2024-03-06 19:36   ` [PATCH v2 0/3] use rte macros instead of GCC __attribute Tyler Retzlaff
2024-03-06 20:49   ` David Marchand
2024-03-06 21:22     ` Tyler Retzlaff
2024-03-06 22:14 ` [PATCH v3 0/5] " Tyler Retzlaff
2024-03-06 22:14   ` [PATCH v3 1/5] eal: add rte pure attribute macro Tyler Retzlaff
2024-03-06 22:14   ` [PATCH v3 2/5] lpm: use rte macro instead of GCC attribute Tyler Retzlaff
2024-03-06 22:14   ` [PATCH v3 3/5] rcu: " Tyler Retzlaff
2024-03-06 22:14   ` [PATCH v3 4/5] app/test: " Tyler Retzlaff
2024-03-06 22:41     ` Morten Brørup
2024-03-06 22:14   ` [PATCH v3 5/5] net/cxgbe: " Tyler Retzlaff
2024-03-06 22:42     ` Morten Brørup
2024-06-12  8:16     ` David Marchand
2024-06-13 13:44       ` David Marchand
2024-06-13 14:05         ` David Marchand
2024-10-07 20:18           ` Stephen Hemminger
2024-10-09  6:47             ` Potnuri Bharat Teja
2024-10-09 20:27     ` David Marchand
2024-06-13 14:07   ` [PATCH v3 0/5] use rte macros instead of GCC __attribute David Marchand

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=1709146076-22254-2-git-send-email-roretzla@linux.microsoft.com \
    --to=roretzla@linux.microsoft.com \
    --cc=bruce.richardson@intel.com \
    --cc=dev@dpdk.org \
    --cc=honnappa.nagarahalli@arm.com \
    --cc=mb@smartsharesystems.com \
    --cc=vladimir.medvedkin@intel.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).