Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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.

Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
Link: http://lkml.kernel.org/n/tip-nbca8p7cg6jyjoit7klh3o91@git.kernel.org

+3
+3
include/uapi/linux/const.h
··· 21 21 #define _AT(T,X) ((T)(X)) 22 22 #endif 23 23 24 + #define _BITUL(x) (_AC(1,UL) << (x)) 25 + #define _BITULL(x) (_AC(1,ULL) << (x)) 26 + 24 27 #endif /* !(_LINUX_CONST_H) */