Thread (3 messages) 3 messages, 3 authors, 2021-09-27

Re: [dpdk-dev] [PATCH] eal: add macro to swap two numbers

From: Thomas Monjalon <hidden>
Date: 2021-09-27 16:32:46

06/09/2021 10:17, Jerin Jacob:
On Wed, Jul 28, 2021 at 8:52 PM Shijith Thotton [off-list ref] wrote:
quoted
Added a macro to swap two numbers and updated common autotest for the
same.

Signed-off-by: Shijith Thotton <sthotton@marvell.com>
Acked-by: Jerin Jacob <redacted>
quoted
Needed-for: drivers: add external clock support for cnxk timer
@Thomas Monjalon  Could you merge this to the main tree if the patch
looks OK to you.
quoted
--- a/lib/eal/include/rte_common.h
+++ b/lib/eal/include/rte_common.h
+/** Macro to swap two numbers. */
+#define RTE_SWAP(a, b) \
+       __extension__ ({ \
+               typeof (a) _a = a; \
+               a = b; \
+               b = _a; \
+       })
Changing comment to:
/** Swap two variables. */

Applied, thanks.

Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help