xref: /OK3568_Linux_fs/kernel/tools/arch/x86/include/uapi/asm/unistd.h (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1*4882a593Smuzhiyun /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
2*4882a593Smuzhiyun #ifndef _UAPI_ASM_X86_UNISTD_H
3*4882a593Smuzhiyun #define _UAPI_ASM_X86_UNISTD_H
4*4882a593Smuzhiyun 
5*4882a593Smuzhiyun /*
6*4882a593Smuzhiyun  * x32 syscall flag bit.  Some user programs expect syscall NR macros
7*4882a593Smuzhiyun  * and __X32_SYSCALL_BIT to have type int, even though syscall numbers
8*4882a593Smuzhiyun  * are, for practical purposes, unsigned long.
9*4882a593Smuzhiyun  *
10*4882a593Smuzhiyun  * Fortunately, expressions like (nr & ~__X32_SYSCALL_BIT) do the right
11*4882a593Smuzhiyun  * thing regardless.
12*4882a593Smuzhiyun  */
13*4882a593Smuzhiyun #define __X32_SYSCALL_BIT	0x40000000
14*4882a593Smuzhiyun 
15*4882a593Smuzhiyun #ifndef __KERNEL__
16*4882a593Smuzhiyun # ifdef __i386__
17*4882a593Smuzhiyun #  include <asm/unistd_32.h>
18*4882a593Smuzhiyun # elif defined(__ILP32__)
19*4882a593Smuzhiyun #  include <asm/unistd_x32.h>
20*4882a593Smuzhiyun # else
21*4882a593Smuzhiyun #  include <asm/unistd_64.h>
22*4882a593Smuzhiyun # endif
23*4882a593Smuzhiyun #endif
24*4882a593Smuzhiyun 
25*4882a593Smuzhiyun #endif /* _UAPI_ASM_X86_UNISTD_H */
26