summaryrefslogtreecommitdiffstats
path: root/include/uapi/linux/const.h
diff options
context:
space:
mode:
authorH. Peter Anvin2013-04-28 01:07:49 +0200
committerH. Peter Anvin2013-06-26 00:50:04 +0200
commit2fc016c5bd8aad2e201cdf71b9fb4573f94775bd (patch)
tree14da7d26a56b2f372e7d4a28422982efbabe9a7c /include/uapi/linux/const.h
parentx86/vdso: Convert use of typedef ctl_table to struct ctl_table (diff)
downloadkernel-qcow2-linux-2fc016c5bd8aad2e201cdf71b9fb4573f94775bd.tar.gz
kernel-qcow2-linux-2fc016c5bd8aad2e201cdf71b9fb4573f94775bd.tar.xz
kernel-qcow2-linux-2fc016c5bd8aad2e201cdf71b9fb4573f94775bd.zip
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
Diffstat (limited to 'include/uapi/linux/const.h')
-rw-r--r--include/uapi/linux/const.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/include/uapi/linux/const.h b/include/uapi/linux/const.h
index c22c707c455d..c872bfd25e13 100644
--- a/include/uapi/linux/const.h
+++ b/include/uapi/linux/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 /* !(_LINUX_CONST_H) */