Loading...
Searching...
No Matches
Go to the documentation of this file.
8#ifndef _UAPI_LINUX_CONST_H
9#define _UAPI_LINUX_CONST_H
24#define __AC(X,Y) (X##Y)
25#define _AC(X,Y) __AC(X,Y)
26#define _AT(T,X) ((T)(X))
29#define _UL(x) (_AC(x, UL))
30#define _ULL(x) (_AC(x, ULL))
32#define _BITUL(x) (_UL(1) << (x))
33#define _BITULL(x) (_ULL(1) << (x))
35#if !defined(__ASSEMBLY__)
49#define _BIT128(x) ((unsigned __int128)(1) << (x))
52#define __ALIGN_KERNEL(x, a) __ALIGN_KERNEL_MASK(x, (__typeof__(x))(a) - 1)
53#define __ALIGN_KERNEL_MASK(x, mask) (((x) + (mask)) & ~(mask))
55#define __KERNEL_DIV_ROUND_UP(n, d) (((n) + (d) - 1) / (d))
63#define __KERNEL_DIV_ROUND_CLOSEST(x, divisor) \
65 __typeof__(x) __x = x; \
66 __typeof__(divisor) __d = divisor; \
68 (((__typeof__(x))-1) > 0 || \
69 ((__typeof__(divisor))-1) > 0 || \
70 (((__x) > 0) == ((__d) > 0))) ? \
71 (((__x) + ((__d) / 2)) / (__d)) : \
72 (((__x) - ((__d) / 2)) / (__d)); \
79#define ULL(x) (_ULL(x))