unistd.h 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. #ifndef _ASM_X86_UNISTD_H
  2. #define _ASM_X86_UNISTD_H 1
  3. #include <uapi/asm/unistd.h>
  4. # ifdef CONFIG_X86_X32_ABI
  5. # define __SYSCALL_MASK (~(__X32_SYSCALL_BIT))
  6. # else
  7. # define __SYSCALL_MASK (~0)
  8. # endif
  9. # ifdef CONFIG_X86_32
  10. # include <asm/unistd_32.h>
  11. # define __ARCH_WANT_STAT64
  12. # define __ARCH_WANT_SYS_IPC
  13. # define __ARCH_WANT_SYS_OLD_MMAP
  14. # define __ARCH_WANT_SYS_OLD_SELECT
  15. # else
  16. # include <asm/unistd_64.h>
  17. # include <asm/unistd_64_x32.h>
  18. # define __ARCH_WANT_COMPAT_SYS_TIME
  19. # endif
  20. # define __ARCH_WANT_OLD_READDIR
  21. # define __ARCH_WANT_OLD_STAT
  22. # define __ARCH_WANT_SYS_ALARM
  23. # define __ARCH_WANT_SYS_FADVISE64
  24. # define __ARCH_WANT_SYS_GETHOSTNAME
  25. # define __ARCH_WANT_SYS_GETPGRP
  26. # define __ARCH_WANT_SYS_LLSEEK
  27. # define __ARCH_WANT_SYS_NICE
  28. # define __ARCH_WANT_SYS_OLDUMOUNT
  29. # define __ARCH_WANT_SYS_OLD_GETRLIMIT
  30. # define __ARCH_WANT_SYS_OLD_UNAME
  31. # define __ARCH_WANT_SYS_PAUSE
  32. # define __ARCH_WANT_SYS_RT_SIGACTION
  33. # define __ARCH_WANT_SYS_RT_SIGSUSPEND
  34. # define __ARCH_WANT_SYS_SGETMASK
  35. # define __ARCH_WANT_SYS_SIGNAL
  36. # define __ARCH_WANT_SYS_SIGPENDING
  37. # define __ARCH_WANT_SYS_SIGPROCMASK
  38. # define __ARCH_WANT_SYS_SOCKETCALL
  39. # define __ARCH_WANT_SYS_TIME
  40. # define __ARCH_WANT_SYS_UTIME
  41. # define __ARCH_WANT_SYS_WAITPID
  42. # define __ARCH_WANT_SYS_FORK
  43. # define __ARCH_WANT_SYS_VFORK
  44. # define __ARCH_WANT_SYS_CLONE
  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. #endif /* _ASM_X86_UNISTD_H */