summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJan Janssen <medhefgo@web.de>2021-10-26 11:07:39 +0200
committerJan Janssen <medhefgo@web.de>2021-11-04 18:37:07 +0100
commita8a7723ba9d76bd97dd9ef882c772644bd241d3b (patch)
tree102909be681fb0c5db30b08ef66af747d3b00612 /src
parentsd-boot: Always compile with -ffreestanding and -fshort-wchar (diff)
downloadsystemd-a8a7723ba9d76bd97dd9ef882c772644bd241d3b.tar.xz
systemd-a8a7723ba9d76bd97dd9ef882c772644bd241d3b.zip
sd-boot: Move flags helpers to macro-fundamental.h
Diffstat (limited to '')
-rw-r--r--src/basic/macro.h7
-rw-r--r--src/fundamental/macro-fundamental.h7
2 files changed, 7 insertions, 7 deletions
diff --git a/src/basic/macro.h b/src/basic/macro.h
index 03a0d061b8..aa04039e80 100644
--- a/src/basic/macro.h
+++ b/src/basic/macro.h
@@ -328,13 +328,6 @@ static inline int __coverity_check_and_return__(int condition) {
ans; \
})
-#define UPDATE_FLAG(orig, flag, b) \
- ((b) ? ((orig) | (flag)) : ((orig) & ~(flag)))
-#define SET_FLAG(v, flag, b) \
- (v) = UPDATE_FLAG(v, flag, b)
-#define FLAGS_SET(v, flags) \
- ((~(v) & (flags)) == 0)
-
#define SWAP_TWO(x, y) do { \
typeof(x) _t = (x); \
(x) = (y); \
diff --git a/src/fundamental/macro-fundamental.h b/src/fundamental/macro-fundamental.h
index ed527adb77..44af0bd0a0 100644
--- a/src/fundamental/macro-fundamental.h
+++ b/src/fundamental/macro-fundamental.h
@@ -306,3 +306,10 @@ static inline size_t ALIGN_TO(size_t l, size_t ali) {
(l <= SIZE_MAX - (ali - 1)), /* overflow? */ \
((l) + (ali) - 1) & ~((ali) - 1), \
VOID_0)
+
+#define UPDATE_FLAG(orig, flag, b) \
+ ((b) ? ((orig) | (flag)) : ((orig) & ~(flag)))
+#define SET_FLAG(v, flag, b) \
+ (v) = UPDATE_FLAG(v, flag, b)
+#define FLAGS_SET(v, flags) \
+ ((~(v) & (flags)) == 0)