]> git.droids-corp.org - dpdk.git/blobdiff - lib/eal/include/rte_common.h
eal/linux: fix illegal memory access in uevent handler
[dpdk.git] / lib / eal / include / rte_common.h
index 99eb5f1820ae3e42dcdf8f630e4e9a8b3fd86b37..4a399cc7c88c635f8a1431883d97aa96bb457414 100644 (file)
@@ -778,6 +778,14 @@ rte_log2_u64(uint64_t v)
                })
 #endif
 
+/** Swap two variables. */
+#define RTE_SWAP(a, b) \
+       __extension__ ({ \
+               typeof (a) _a = a; \
+               a = b; \
+               b = _a; \
+       })
+
 /**
  * Get the size of a field in a structure.
  *