48 if (0 == ((pa | pb) & (sizeof (TYPE) - 1))) \ 50 TYPE * a = uword_to_pointer (pa, TYPE *); \ 51 TYPE * b = uword_to_pointer (pb, TYPE *); \ 53 while (bytes >= 2*sizeof (TYPE)) \ 55 TYPE a0, a1, b0, b1; \ 56 bytes -= 2*sizeof (TYPE); \ 59 a0 = a[-2]; a1 = a[-1]; \ 60 b0 = b[-2]; b1 = b[-1]; \ 61 a[-2] = b0; a[-1] = b1; \ 62 b[-2] = a0; b[-1] = a1; \ 64 pa = pointer_to_uword (a); \ 65 pb = pointer_to_uword (b); \ 81 u8 a0 = a[0], b0 = b[0];
void clib_memswap(void *_a, void *_b, uword bytes)
static uword pointer_to_uword(const void *p)
#define uword_to_pointer(u, type)