unistd.h 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  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_32
  7. # include <asm/unistd_32.h>
  8. # define __ARCH_WANT_IPC_PARSE_VERSION
  9. # define __ARCH_WANT_STAT64
  10. # define __ARCH_WANT_SYS_IPC
  11. # define __ARCH_WANT_SYS_OLD_MMAP
  12. # define __ARCH_WANT_SYS_OLD_SELECT
  13. # else
  14. # include <asm/unistd_64.h>
  15. # include <asm/unistd_64_x32.h>
  16. # define __ARCH_WANT_COMPAT_SYS_TIME
  17. # endif
  18. # define __ARCH_WANT_OLD_READDIR
  19. # define __ARCH_WANT_OLD_STAT
  20. # define __ARCH_WANT_SYS_ALARM
  21. # define __ARCH_WANT_SYS_FADVISE64
  22. # define __ARCH_WANT_SYS_GETHOSTNAME
  23. # define __ARCH_WANT_SYS_GETPGRP
  24. # define __ARCH_WANT_SYS_LLSEEK
  25. # define __ARCH_WANT_SYS_NICE
  26. # define __ARCH_WANT_SYS_OLDUMOUNT
  27. # define __ARCH_WANT_SYS_OLD_GETRLIMIT
  28. # define __ARCH_WANT_SYS_OLD_UNAME
  29. # define __ARCH_WANT_SYS_PAUSE
  30. # define __ARCH_WANT_SYS_RT_SIGACTION
  31. # define __ARCH_WANT_SYS_RT_SIGSUSPEND
  32. # define __ARCH_WANT_SYS_SGETMASK
  33. # define __ARCH_WANT_SYS_SIGNAL
  34. # define __ARCH_WANT_SYS_SIGPENDING
  35. # define __ARCH_WANT_SYS_SIGPROCMASK
  36. # define __ARCH_WANT_SYS_SOCKETCALL
  37. # define __ARCH_WANT_SYS_TIME
  38. # define __ARCH_WANT_SYS_UTIME
  39. # define __ARCH_WANT_SYS_WAITPID
  40. /*
  41. * "Conditional" syscalls
  42. *
  43. * What we want is __attribute__((weak,alias("sys_ni_syscall"))),
  44. * but it doesn't work on all toolchains, so we just do it by hand
  45. */
  46. # define cond_syscall(x) asm(".weak\t" #x "\n\t.set\t" #x ",sys_ni_syscall")
  47. #else
  48. # ifdef __i386__
  49. # include <asm/unistd_32.h>
  50. # elif defined(__LP64__)
  51. # include <asm/unistd_64.h>
  52. # else
  53. # include <asm/unistd_x32.h>
  54. # endif
  55. #endif
  56. #endif /* _ASM_X86_UNISTD_H */