Blame include/uapi/linux/const.h

Packit Service 3880ab
/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
Packit Service 3880ab
/* const.h: Macros for dealing with constants.  */
Packit Service 3880ab
Packit Service 3880ab
#ifndef _LINUX_CONST_H
Packit Service 3880ab
#define _LINUX_CONST_H
Packit Service 3880ab
Packit Service 3880ab
/* Some constant macros are used in both assembler and
Packit Service 3880ab
 * C code.  Therefore we cannot annotate them always with
Packit Service 3880ab
 * 'UL' and other type specifiers unilaterally.  We
Packit Service 3880ab
 * use the following macros to deal with this.
Packit Service 3880ab
 *
Packit Service 3880ab
 * Similarly, _AT() will cast an expression with a type in C, but
Packit Service 3880ab
 * leave it unchanged in asm.
Packit Service 3880ab
 */
Packit Service 3880ab
Packit Service 3880ab
#ifdef __ASSEMBLY__
Packit Service 3880ab
#define _AC(X,Y)	X
Packit Service 3880ab
#define _AT(T,X)	X
Packit Service 3880ab
#else
Packit Service 3880ab
#define __AC(X,Y)	(X##Y)
Packit Service 3880ab
#define _AC(X,Y)	__AC(X,Y)
Packit Service 3880ab
#define _AT(T,X)	((T)(X))
Packit Service 3880ab
#endif
Packit Service 3880ab
Packit Service 3880ab
#define _UL(x)		(_AC(x, UL))
Packit Service 3880ab
#define _ULL(x)		(_AC(x, ULL))
Packit Service 3880ab
Packit Service 3880ab
#define _BITUL(x)	(_UL(1) << (x))
Packit Service 3880ab
#define _BITULL(x)	(_ULL(1) << (x))
Packit Service 3880ab
Packit Service 3880ab
#endif /* _LINUX_CONST_H */