[dpdk-dev] [PATCH] eal: add macro to swap two numbers
Thomas Monjalon
thomas at monjalon.net
Mon Sep 27 18:32:38 CEST 2021
06/09/2021 10:17, Jerin Jacob:
> On Wed, Jul 28, 2021 at 8:52 PM Shijith Thotton <sthotton at marvell.com> wrote:
> >
> > Added a macro to swap two numbers and updated common autotest for the
> > same.
> >
> > Signed-off-by: Shijith Thotton <sthotton at marvell.com>
>
> Acked-by: Jerin Jacob <jerinj at marvell.com>
>
> > 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.
>
> > --- 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.
More information about the dev
mailing list