|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-devel] [PATCH 01/20] xen/const: Introduce _BITUL and _BITULL
The pattern _AC(1, UL{,L}) << X is commonly used in the headers to make
define usuable in both assembly and C.
So introduce _BITUL and _BITULL to make the code slightly more readable.
The idea has been taken from Linux (see include/uapi/linux.h).
Signed-off-by: Julien Grall <julien.grall@xxxxxxx>
---
xen/include/xen/const.h | 3 +++
1 file changed, 3 insertions(+)
diff --git a/xen/include/xen/const.h b/xen/include/xen/const.h
index 0d5b2c64f5..b4b067bffa 100644
--- a/xen/include/xen/const.h
+++ b/xen/include/xen/const.h
@@ -21,4 +21,7 @@
#define _AT(T,X) ((T)(X))
#endif
+#define _BITUL(x) (_AC(1, UL) << (x))
+#define _BITULL(x) (_AC(1, ULL) << (x))
+
#endif /* __XEN_CONST_H__ */
--
2.11.0
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/xen-devel
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |