__GNUC_PATCHLEVEL__)
#endif
+/**
+ * Force alignment
+ */
+#define __rte_aligned(a) __attribute__((__aligned__(a)))
+
#ifdef RTE_ARCH_STRICT_ALIGN
typedef uint64_t unaligned_uint64_t __rte_aligned(1);
typedef uint32_t unaligned_uint32_t __rte_aligned(1);
typedef uint16_t unaligned_uint16_t;
#endif
-/**
- * Force alignment
- */
-#define __rte_aligned(a) __attribute__((__aligned__(a)))
-
/**
* Force a structure to be packed
*/
*/
#define __rte_unused __attribute__((__unused__))
+/**
+ * Mark pointer as restricted with regard to pointer aliasing.
+ */
+#if !defined(__STDC_VERSION__) || __STDC_VERSION__ < 199901L
+#define __rte_restrict __restrict
+#else
+#define __rte_restrict restrict
+#endif
+
/**
* definition to mark a variable or function parameter as used so
* as to avoid a compiler warning
#define RTE_FINI(func) \
RTE_FINI_PRIO(func, LAST)
+/**
+ * Hint never returning function
+ */
+#define __rte_noreturn __attribute__((noreturn))
+
/**
* Force a function to be inlined
*/
* The combined value.
*/
static inline uint32_t
-rte_combine32ms1b(register uint32_t x)
+rte_combine32ms1b(uint32_t x)
{
x |= x >> 1;
x |= x >> 2;
* The combined value.
*/
static inline uint64_t
-rte_combine64ms1b(register uint64_t v)
+rte_combine64ms1b(uint64_t v)
{
v |= v >> 1;
v |= v >> 2;
* printf format characters which will be expanded using any further parameters
* to the function.
*/
-void
+__rte_noreturn void
rte_exit(int exit_code, const char *format, ...)
- __attribute__((noreturn))
__rte_format_printf(2, 3);
#ifdef __cplusplus