unistd.h 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  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_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. # define __ARCH_WANT_SYS_FORK
  41. # define __ARCH_WANT_SYS_VFORK
  42. # define __ARCH_WANT_SYS_CLONE
  43. /*
  44. * "Conditional" syscalls
  45. *
  46. * What we want is __attribute__((weak,alias("sys_ni_syscall"))),
  47. * but it doesn't work on all toolchains, so we just do it by hand
  48. */
  49. # define cond_syscall(x) asm(".weak\t" #x "\n\t.set\t" #x ",sys_ni_syscall")
  50. #endif /* _ASM_X86_UNISTD_H */