0001
0002
0003
0004 #ifndef _UAPI_LINUX_CONST_H
0005 #define _UAPI_LINUX_CONST_H
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016 #ifdef __ASSEMBLY__
0017 #define _AC(X,Y) X
0018 #define _AT(T,X) X
0019 #else
0020 #define __AC(X,Y) (X##Y)
0021 #define _AC(X,Y) __AC(X,Y)
0022 #define _AT(T,X) ((T)(X))
0023 #endif
0024
0025 #define _UL(x) (_AC(x, UL))
0026 #define _ULL(x) (_AC(x, ULL))
0027
0028 #define _BITUL(x) (_UL(1) << (x))
0029 #define _BITULL(x) (_ULL(1) << (x))
0030
0031 #define __ALIGN_KERNEL(x, a) __ALIGN_KERNEL_MASK(x, (typeof(x))(a) - 1)
0032 #define __ALIGN_KERNEL_MASK(x, mask) (((x) + (mask)) & ~(mask))
0033
0034 #define __KERNEL_DIV_ROUND_UP(n, d) (((n) + (d) - 1) / (d))
0035
0036 #endif