chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
resolved: fix notification iteration logic when transactions are completed
[elogind.git]
/
src
/
basic
/
macro.h
diff --git
a/src/basic/macro.h
b/src/basic/macro.h
index 2695d0edb75ba436e645fc1f32786dde78e22bbd..ab5cc97e17ac386a9031c0f61053e699fd2f5a1e 100644
(file)
--- 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