Elliott Hughes | 180edef | 2023-11-02 00:08:05 +0000 | [diff] [blame] | 1 | /* |
| 2 | * This file is auto-generated. Modifications will be lost. |
| 3 | * |
| 4 | * See https://android.googlesource.com/platform/bionic/+/master/libc/kernel/ |
| 5 | * for more information. |
| 6 | */ |
Christopher Ferris | 76a1d45 | 2018-06-27 14:12:29 -0700 | [diff] [blame] | 7 | #ifndef _UAPI_LINUX_CONST_H |
| 8 | #define _UAPI_LINUX_CONST_H |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 9 | #ifdef __ASSEMBLY__ |
| 10 | #define _AC(X,Y) X |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 11 | #define _AT(T,X) X |
| 12 | #else |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 13 | #define __AC(X,Y) (X ##Y) |
| 14 | #define _AC(X,Y) __AC(X, Y) |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 15 | #define _AT(T,X) ((T) (X)) |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 16 | #endif |
Christopher Ferris | 76a1d45 | 2018-06-27 14:12:29 -0700 | [diff] [blame] | 17 | #define _UL(x) (_AC(x, UL)) |
| 18 | #define _ULL(x) (_AC(x, ULL)) |
| 19 | #define _BITUL(x) (_UL(1) << (x)) |
| 20 | #define _BITULL(x) (_ULL(1) << (x)) |
Christopher Ferris | 37c3f3c | 2023-07-10 10:59:05 -0700 | [diff] [blame] | 21 | #define __ALIGN_KERNEL(x,a) __ALIGN_KERNEL_MASK(x, (__typeof__(x)) (a) - 1) |
Christopher Ferris | 05667cd | 2021-02-16 16:01:34 -0800 | [diff] [blame] | 22 | #define __ALIGN_KERNEL_MASK(x,mask) (((x) + (mask)) & ~(mask)) |
| 23 | #define __KERNEL_DIV_ROUND_UP(n,d) (((n) + (d) - 1) / (d)) |
Nick Kralevich | a67e4de | 2013-01-14 11:28:26 -0800 | [diff] [blame] | 24 | #endif |