History

linux/const.h: Add _BITUL() and _BITULL()

Add macros for single bit definitions of a specific type. These are similar to the BIT() macro that already exists, but with a few exceptions: 1. The namespace is such that they can be used in uapi definitions. 2. The type is set with the _AC() macro to allow it to be used in assembly. 3. The type is explicitly specified to be UL or ULL.

H. Peter Anvin committed 13 years ago

Commit 2fc016c1 parent f07d91e1 file · +3 −0Browse files

Unified · Split

include/uapi/linux/const.h+3−0
@@ -21,4 +21,7 @@ · 20 unmodified lines
2121 #define _AT(T,X) ((T)(X))
2222 #endif
2323
24+#define _BITUL(x) (_AC(1,UL) << (x))
25+#define _BITULL(x) (_AC(1,ULL) << (x))
26+
2427 #endif /* !(_LINUX_CONST_H) */