X-Git-Url: http://git.ozlabs.org/?p=ccan;a=blobdiff_plain;f=ccan%2Fmem%2Fmem.h;h=dd66cc62cd8cce990aeac17da41962aa2bf74a74;hp=99c34c0a39719ec0a262add21e74bab5b99a8e56;hb=428d3b0217b32892c2fd309358619a4877113833;hpb=8f6126000bfebc71f566ce56387f86fcd567e2c7;ds=sidebyside diff --git a/ccan/mem/mem.h b/ccan/mem/mem.h index 99c34c0a..dd66cc62 100644 --- a/ccan/mem/mem.h +++ b/ccan/mem/mem.h @@ -217,4 +217,14 @@ static inline bool memoverlaps(const void *a_, size_t al, return (a < (b + bl)) && (b < (a + al)); } +/* + * memswap - Exchange two memory regions + * @a: first region + * @b: second region + * @n: length of the regions + * + * Undefined results if the two memory regions overlap. + */ +void memswap(void *a, void *b, size_t n); + #endif /* CCAN_MEM_H */