unistd.h 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  1. #ifndef _ASM_X86_UNISTD_H
  2. #define _ASM_X86_UNISTD_H 1
  3. /* x32 syscall flag bit */
  4. #define __X32_SYSCALL_BIT 0x40000000
  5. #ifdef __KERNEL__
  6. # ifdef CONFIG_X86_X32_ABI
  7. # define __SYSCALL_MASK (~(__X32_SYSCALL_BIT))
  8. # else
  9. # define __SYSCALL_MASK (~0)
  10. # endif
  11. # ifdef CONFIG_X86_32
  12. # include <asm/unistd_32.h>
  13. # define __ARCH_WANT_IPC_PARSE_VERSION
  14. # define __ARCH_WANT_STAT64
  15. # define __ARCH_WANT_SYS_IPC
  16. # define __ARCH_WANT_SYS_OLD_MMAP
  17. # define __ARCH_WANT_SYS_OLD_SELECT
  18. # else
  19. # include <asm/unistd_64.h>
  20. # include <asm/unistd_64_x32.h>
  21. # define __ARCH_WANT_COMPAT_SYS_TIME
  22. # endif
  23. # define __ARCH_WANT_OLD_READDIR
  24. # define __ARCH_WANT_OLD_STAT
  25. # define __ARCH_WANT_SYS_ALARM
  26. # define __ARCH_WANT_SYS_FADVISE64
  27. # define __ARCH_WANT_SYS_GETHOSTNAME
  28. # define __ARCH_WANT_SYS_GETPGRP
  29. # define __ARCH_WANT_SYS_LLSEEK
  30. # define __ARCH_WANT_SYS_NICE
  31. # define __ARCH_WANT_SYS_OLDUMOUNT
  32. # define __ARCH_WANT_SYS_OLD_GETRLIMIT
  33. # define __ARCH_WANT_SYS_OLD_UNAME
  34. # define __ARCH_WANT_SYS_PAUSE
  35. # define __ARCH_WANT_SYS_RT_SIGACTION
  36. # define __ARCH_WANT_SYS_RT_SIGSUSPEND
  37. # define __ARCH_WANT_SYS_SGETMASK
  38. # define __ARCH_WANT_SYS_SIGNAL
  39. # define __ARCH_WANT_SYS_SIGPENDING
  40. # define __ARCH_WANT_SYS_SIGPROCMASK
  41. # define __ARCH_WANT_SYS_SOCKETCALL
  42. # define __ARCH_WANT_SYS_TIME
  43. # define __ARCH_WANT_SYS_UTIME
  44. # define __ARCH_WANT_SYS_WAITPID
  45. /*
  46. * "Conditional" syscalls
  47. *
  48. * What we want is __attribute__((weak,alias("sys_ni_syscall"))),
  49. * but it doesn't work on all toolchains, so we just do it by hand
  50. */
  51. # define cond_syscall(x) asm(".weak\t" #x "\n\t.set\t" #x ",sys_ni_syscall")
  52. #else
  53. # ifdef __i386__
  54. # include <asm/unistd_32.h>
  55. # elif defined(__ILP32__)
  56. # include <asm/unistd_x32.h>
  57. # else
  58. # include <asm/unistd_64.h>
  59. # endif
  60. #endif
  61. #endif /* _ASM_X86_UNISTD_H */