[1/3] eal: add rte pure attribute macro
Checks
Commit Message
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>
---
lib/eal/include/rte_common.h | 9 +++++++++
1 file changed, 9 insertions(+)
@@ -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