1 /* SPDX-License-Identifier: BSD-3-Clause
2 * Copyright(c) 2015 Neil Horman <nhorman@tuxdriver.com>.
13 #ifndef ALLOW_EXPERIMENTAL_API
15 #define __rte_experimental \
16 __attribute__((deprecated("Symbol is not yet part of stable ABI"), \
17 section(".text.experimental")))
21 #define __rte_experimental \
22 __attribute__((section(".text.experimental")))
26 #ifndef __has_attribute
27 /* if no has_attribute assume no support for attribute too */
28 #define __has_attribute(x) 0
31 #if !defined ALLOW_INTERNAL_API && __has_attribute(error) /* For GCC */
33 #define __rte_internal \
34 __attribute__((error("Symbol is not public ABI"), \
35 section(".text.internal")))
37 #elif !defined ALLOW_INTERNAL_API && __has_attribute(diagnose_if) /* For clang */
39 #define __rte_internal \
40 _Pragma("GCC diagnostic push") \
41 _Pragma("GCC diagnostic ignored \"-Wgcc-compat\"") \
42 __attribute__((diagnose_if(1, "Symbol is not public ABI", "error"), \
43 section(".text.internal"))) \
44 _Pragma("GCC diagnostic pop")
48 #define __rte_internal \
49 __attribute__((section(".text.internal")))
57 #endif /* _RTE_COMPAT_H_ */