diff options
Diffstat (limited to 'src/basic/macro.h')
-rw-r--r-- | src/basic/macro.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/basic/macro.h b/src/basic/macro.h index 2695d0edb7..ab5cc97e17 100644 --- a/src/basic/macro.h +++ b/src/basic/macro.h @@ -361,6 +361,12 @@ static inline unsigned long ALIGN_POWER2(unsigned long u) { _found; \ }) +#define SWAP_TWO(x, y) do { \ + typeof(x) _t = (x); \ + (x) = (y); \ + (y) = (_t); \ + } while (false) + /* Define C11 thread_local attribute even on older gcc compiler * version */ #ifndef thread_local |