blob: c091f8dfa5bf89d2ec233aaae31fe1621a830566 [file] [log] [blame]
Elliott Hughes180edef2023-11-02 00:08:05 +00001/*
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 Ferris76a1d452018-06-27 14:12:29 -07007#ifndef _UAPI_LINUX_CONST_H
8#define _UAPI_LINUX_CONST_H
Ben Cheng655a7c02013-10-16 16:09:24 -07009#ifdef __ASSEMBLY__
10#define _AC(X,Y) X
Ben Cheng655a7c02013-10-16 16:09:24 -070011#define _AT(T,X) X
12#else
Tao Baod7db5942015-01-28 10:07:51 -080013#define __AC(X,Y) (X ##Y)
14#define _AC(X,Y) __AC(X, Y)
Tao Baod7db5942015-01-28 10:07:51 -080015#define _AT(T,X) ((T) (X))
Ben Cheng655a7c02013-10-16 16:09:24 -070016#endif
Christopher Ferris76a1d452018-06-27 14:12:29 -070017#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 Ferris37c3f3c2023-07-10 10:59:05 -070021#define __ALIGN_KERNEL(x,a) __ALIGN_KERNEL_MASK(x, (__typeof__(x)) (a) - 1)
Christopher Ferris05667cd2021-02-16 16:01:34 -080022#define __ALIGN_KERNEL_MASK(x,mask) (((x) + (mask)) & ~(mask))
23#define __KERNEL_DIV_ROUND_UP(n,d) (((n) + (d) - 1) / (d))
Nick Kralevicha67e4de2013-01-14 11:28:26 -080024#endif